diff --git a/app/code/[id]/page.tsx b/app/code/[id]/page.tsx new file mode 100644 index 0000000..3d1887a --- /dev/null +++ b/app/code/[id]/page.tsx @@ -0,0 +1,18 @@ +import Navbar from "@/components/navbar" +import dynamic from "next/dynamic" +import Image from "next/image" + +const CodeEditor = dynamic(() => import("@/components/editor"), { + ssr: false, +}) + +export default function CodePage() { + return ( +
+ +
+ +
+
+ ) +} diff --git a/app/code/page.tsx b/app/code/page.tsx new file mode 100644 index 0000000..0206b35 --- /dev/null +++ b/app/code/page.tsx @@ -0,0 +1,5 @@ +import { redirect } from "next/navigation" + +export default function Page() { + redirect("/") +} diff --git a/app/page.tsx b/app/page.tsx index 43a025b..8cd6282 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,18 +1,8 @@ import Navbar from "@/components/navbar" import dynamic from "next/dynamic" -import Image from "next/image" - -const CodeEditor = dynamic(() => import("@/components/editor"), { - ssr: false, -}) export default function Home() { return ( -
- -
- -
-
+
test
) } diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 0000000..08b73a6 Binary files /dev/null and b/assets/logo.png differ diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..8282526 --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/editor/index.tsx b/components/editor/index.tsx index d6b6aae..b308a51 100644 --- a/components/editor/index.tsx +++ b/components/editor/index.tsx @@ -82,6 +82,16 @@ export default function CodeEditor() { height="100%" defaultLanguage="typescript" onMount={handleEditorMount} + options={{ + minimap: { + enabled: false, + }, + padding: { + bottom: 4, + top: 4, + }, + scrollBeyondLastLine: false, + }} theme="vs-dark" /> diff --git a/components/navbar/index.tsx b/components/navbar/index.tsx index 54eb114..bd8be9c 100644 --- a/components/navbar/index.tsx +++ b/components/navbar/index.tsx @@ -1,13 +1,21 @@ -import { ChevronLeft, Home } from "lucide-react" -import { Button } from "../ui/button" +import Image from "next/image" +import Logo from "@/assets/logo.svg" +import { Input } from "../ui/input" +import { Pencil } from "lucide-react" export default function Navbar() { return ( -
-
- +
+
+ +
+ My React Project{" "} +
+ +
+
) diff --git a/components/ui/input.tsx b/components/ui/input.tsx new file mode 100644 index 0000000..a92b8e0 --- /dev/null +++ b/components/ui/input.tsx @@ -0,0 +1,25 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +export interface InputProps + extends React.InputHTMLAttributes {} + +const Input = React.forwardRef( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } diff --git a/components/ui/tab.tsx b/components/ui/tab.tsx index 11ca1df..b791d13 100644 --- a/components/ui/tab.tsx +++ b/components/ui/tab.tsx @@ -22,7 +22,7 @@ export default function Tab({ {children}