mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2026-01-05 05:02:08 +00:00
fix: build errors fix attempt
This commit is contained in:
@@ -15,7 +15,6 @@ type Props = Pick<Tool, "Icon" | "shortTitle"> &
|
||||
// FIXME: css outline messed up
|
||||
export function ToolLink({ Icon, shortTitle: title, href, onClick, highlight, grouped }: Props) {
|
||||
return (
|
||||
// @ts-expect-error react 19 beta error
|
||||
<Link
|
||||
className={cn(
|
||||
"flex h-10 items-center gap-3 whitespace-nowrap rounded",
|
||||
|
||||
@@ -24,9 +24,9 @@ export function SiteHeader({ className }: Props) {
|
||||
className="flex items-center rounded p-1.5 hover:bg-accent"
|
||||
onClick={toggleSidebar}
|
||||
>
|
||||
<span className="sr-only">Toggle sidebar</span>
|
||||
<Menu />
|
||||
</button>
|
||||
{/* @ts-expect-error react 19 beta error */}
|
||||
<Link className="text-lg" href="/">
|
||||
{siteConfig.name}
|
||||
</Link>
|
||||
|
||||
@@ -6,7 +6,6 @@ export type ToolCardProps = Pick<Tool, "Icon" | "longTitle" | "description" | "h
|
||||
|
||||
export function ToolCard({ Icon, longTitle, description, href }: ToolCardProps) {
|
||||
return (
|
||||
// @ts-expect-error react 19 beta error
|
||||
<Link className="rounded" {...{ href }}>
|
||||
<div className="group flex h-80 w-44 flex-col items-center gap-5 overflow-hidden rounded border bg-card p-5 text-card-foreground hover:bg-card-hover">
|
||||
<div className="flex flex-col p-5">
|
||||
|
||||
@@ -4,25 +4,18 @@ import { ComponentProps } from "react";
|
||||
import { DiffEditor as MonacoDiffEditor } from "@monaco-editor/react";
|
||||
import { useTheme } from "next-themes";
|
||||
|
||||
// @ts-expect-error react 19 beta error
|
||||
export type DiffEditorProps = ComponentProps<typeof MonacoDiffEditor>;
|
||||
// @ts-expect-error react 19 beta error
|
||||
export const DiffEditor = ({ options, theme, ...props }: DiffEditorProps) => {
|
||||
const { theme: appTheme } = useTheme();
|
||||
const themeToUse = theme ?? (appTheme === "light" ? "light" : "vs-dark");
|
||||
|
||||
return (
|
||||
// @ts-expect-error react 19 beta error
|
||||
<MonacoDiffEditor
|
||||
// @ts-expect-error react 19 beta error
|
||||
theme={themeToUse}
|
||||
// @ts-expect-error react 19 beta error
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
options={{
|
||||
tabFocusMode: true,
|
||||
automaticLayout: true,
|
||||
scrollBeyondLastLine: false,
|
||||
// @ts-expect-error react 19 beta error
|
||||
...options, // NOTE: merge shallowly
|
||||
}}
|
||||
{...props}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { ComponentProps } from "react";
|
||||
import MonacoEditor from "@monaco-editor/react";
|
||||
import { useTheme } from "next-themes";
|
||||
|
||||
// @ts-expect-error react 19 beta error
|
||||
export type EditorProps = ComponentProps<typeof MonacoEditor>;
|
||||
|
||||
/**
|
||||
@@ -13,25 +12,19 @@ export type EditorProps = ComponentProps<typeof MonacoEditor>;
|
||||
* @see https://github.com/suren-atoyan/monaco-react/issues/346
|
||||
*
|
||||
*/
|
||||
// @ts-expect-error react 19 beta error
|
||||
export const Editor = ({ options, theme, ...props }: EditorProps) => {
|
||||
const { theme: appTheme } = useTheme();
|
||||
const themeToUse = theme ?? (appTheme === "light" ? "light" : "vs-dark");
|
||||
|
||||
return (
|
||||
// @ts-expect-error react 19 beta error
|
||||
<MonacoEditor
|
||||
// @ts-expect-error react 19 beta error
|
||||
theme={themeToUse}
|
||||
// @ts-expect-error react 19 beta error
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
options={{
|
||||
tabFocusMode: true,
|
||||
detectIndentation: false,
|
||||
minimap: { enabled: false },
|
||||
automaticLayout: true,
|
||||
scrollBeyondLastLine: false,
|
||||
// @ts-expect-error react 19 beta error
|
||||
...options, // NOTE: merge shallowly
|
||||
}}
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user