diff --git a/src/app/(app)/layout.tsx b/src/app/(app)/layout.tsx new file mode 100644 index 0000000..1894622 --- /dev/null +++ b/src/app/(app)/layout.tsx @@ -0,0 +1,16 @@ +import { Banner } from "@/components/banner"; + +interface AppLayoutProps { + children: React.ReactNode; +} + +export default function AppLayout({ children }: AppLayoutProps) { + return ( +
+ +
+ {children} +
+
+ ); +} diff --git a/src/app/page.tsx b/src/app/(app)/page.tsx similarity index 90% rename from src/app/page.tsx rename to src/app/(app)/page.tsx index 4838bc6..5328ccb 100644 --- a/src/app/page.tsx +++ b/src/app/(app)/page.tsx @@ -2,7 +2,7 @@ import CodeEditor from "@/components/code-editor"; import { DEFAULT_PROBLEM } from "@/config/problem"; import MdxPreview from "@/components/problem-description"; -export default function Home() { +export default function HomePage() { return (
@@ -12,5 +12,5 @@ export default function Home() {
- ) + ); } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index ef63a75..0679ea5 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,31 +1,29 @@ import "./globals.css"; import type { Metadata } from "next"; -import { Banner } from "@/components/banner"; import { ThemeProvider } from "@/components/theme-provider"; export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "monaco-editor-lsp-next", + description: "A Next.js integration of Monaco Editor with LSP support, free from SSR issues", }; -export default function RootLayout({ - children, -}: Readonly<{ +interface RootLayoutProps { children: React.ReactNode; -}>) { +} + +export default function RootLayout({ children }: RootLayoutProps) { return ( - + - -
+
{children} -
+
diff --git a/src/components/banner.tsx b/src/components/banner.tsx index 2d09b96..b23953d 100644 --- a/src/components/banner.tsx +++ b/src/components/banner.tsx @@ -1,3 +1,4 @@ +import { cn } from "@/lib/utils"; import { siteConfig } from "@/config/site"; import { ArrowRightIcon } from "lucide-react"; @@ -14,18 +15,19 @@ export function Banner({ ...props }: BannerProps) { return ( -
-

- - - {text} - -

-
+
+ + + {text} + +
); }