diff --git a/src/app/calendar/page.tsx b/src/app/calendar/page.tsx index 26e0c8a..c2f8ca2 100644 --- a/src/app/calendar/page.tsx +++ b/src/app/calendar/page.tsx @@ -1,5 +1,10 @@ +import { Metadata } from "next"; import React from "react"; +export const metadata: Metadata = { + title: "Calendar", +}; + const page = () => { return
Calendar
; }; diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 4f5ba78..896db1b 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -12,13 +12,13 @@ import { import { Metadata } from "next"; export const metadata: Metadata = { - title: "Dashboard :)", + title: "Dashboard", }; export default function Home() { return (
-
+
diff --git a/src/app/favicon.ico b/src/app/favicon.ico index 718d6fe..187e048 100644 Binary files a/src/app/favicon.ico and b/src/app/favicon.ico differ diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 03832df..e3b9641 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -11,8 +11,8 @@ import { dark } from "@clerk/themes"; const red_hat = Red_Hat_Display({ subsets: ["latin"] }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "yellowbird", + description: "yellowbird finance", }; export default function RootLayout({ @@ -40,9 +40,9 @@ export default function RootLayout({ disableTransitionOnChange > -
+
-
{children}
+
{children}
diff --git a/src/app/portfolio/page.tsx b/src/app/portfolio/page.tsx index 0ee0764..97ec212 100644 --- a/src/app/portfolio/page.tsx +++ b/src/app/portfolio/page.tsx @@ -1,5 +1,10 @@ +import { Metadata } from "next"; import React from "react"; +export const metadata: Metadata = { + title: "Portfolio", +}; + const page = () => { return
Portfolio
; }; diff --git a/src/app/tests/page.tsx b/src/app/tests/page.tsx index 88159ee..256dfac 100644 --- a/src/app/tests/page.tsx +++ b/src/app/tests/page.tsx @@ -1,12 +1,16 @@ -"use client"; - -import InsiderTrading from "@/components/charts/InsiderTrading"; -import HomepageModule from "@/components/modules/HomepageModuleCard"; +import CommandKey from "@/components/nav/CommandKey"; +import CommandMenu from "@/components/nav/CommandMenu"; import React from "react"; -import { insiderTransactions } from "../../../public/MockData/MockData"; -const tests = () => { - return ; +const page = () => { + return ( +
+
+ +
+ +
+ ); }; -export default tests; +export default page; diff --git a/src/components/UserItem.tsx b/src/components/UserItem.tsx index 57526a1..d2d8546 100644 --- a/src/components/UserItem.tsx +++ b/src/components/UserItem.tsx @@ -12,7 +12,7 @@ const UserItem = ({ isCollapsed }: UserItemProps) => { const { user } = useUser(); if (!user) { - return
No user
; + return; } console.log(user.primaryEmailAddress); diff --git a/src/components/nav/CommandKey.tsx b/src/components/nav/CommandKey.tsx new file mode 100644 index 0000000..e840413 --- /dev/null +++ b/src/components/nav/CommandKey.tsx @@ -0,0 +1,45 @@ +"use client"; + +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, + CommandShortcut, + CommandDialog, +} from "@/components/ui/command"; +import { useEffect, useState } from "react"; + +const CommandKey = () => { + const [open, setOpen] = useState(false); + + useEffect(() => { + const down = (e: KeyboardEvent) => { + if (e.key === "/" && (e.metaKey || e.ctrlKey)) { + e.preventDefault(); + setOpen((open) => !open); + } + }; + document.addEventListener("keydown", down); + return () => document.removeEventListener("keydown", down); + }, []); + + return ( + + + + No results found. + + Calendar + Search Emoji + Calculator + + + + ); +}; + +export default CommandKey; diff --git a/src/components/nav/CommandMenu.tsx b/src/components/nav/CommandMenu.tsx new file mode 100644 index 0000000..88d7abe --- /dev/null +++ b/src/components/nav/CommandMenu.tsx @@ -0,0 +1,84 @@ +"use client"; + +import React, { useState } from "react"; +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, + CommandShortcut, +} from "@/components/ui/command"; +import { + CalendarIcon, + CircleUserIcon, + MailIcon, + RocketIcon, + SettingsIcon, + UserIcon, +} from "lucide-react"; +import { cn } from "@/lib/utils"; +import { Badge } from "../ui/badge"; + +const CommandMenu = () => { + const [open, setOpen] = useState(false); + + const handleFocus = () => { + setOpen(!open); + }; + + return ( + + + {open && ( + + No results found. + + + + Calendar + + + + Search Emoji + + + + Launch + + + + + + + Profile + ⌘P + + + + Mail + ⌘B + + + + Settings + ⌘S + + + + )} + + ); +}; + +export default CommandMenu; diff --git a/src/components/nav/Navbar.tsx b/src/components/nav/Navbar.tsx index 9e556f4..19b7cdc 100644 --- a/src/components/nav/Navbar.tsx +++ b/src/components/nav/Navbar.tsx @@ -7,6 +7,7 @@ import { Input } from "../ui/input"; import Link from "next/link"; import { useRouter } from "next/navigation"; import Image from "next/image"; +import CommandMenu from "./CommandMenu"; const Navbar = () => { const [inputValue, setInputvalue] = useState(""); @@ -24,8 +25,9 @@ const Navbar = () => { return (
Dashboard
-
- + + {/* { className="w-12 rounded-lg lg:rounded-l-none bg-transparent border-neutral-700 border lg:border-l-0 text-primary hover:text-neutral-700" > - + */}
); diff --git a/src/components/nav/Sidebar.tsx b/src/components/nav/Sidebar.tsx index 5646bd2..75b6ac9 100644 --- a/src/components/nav/Sidebar.tsx +++ b/src/components/nav/Sidebar.tsx @@ -21,6 +21,7 @@ import { RocketIcon, Settings, SettingsIcon, + TestTube, } from "lucide-react"; import { Command, @@ -70,6 +71,11 @@ function Sidebar() { icon: , text: "Portfolio", }, + { + link: "/tests", + icon: , + text: "Test", + }, ], }, { diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx index 26c1ddb..345c2f7 100644 --- a/src/components/ui/command.tsx +++ b/src/components/ui/command.tsx @@ -7,6 +7,7 @@ import { Search } from "lucide-react"; import { cn } from "@/lib/utils"; import { Dialog, DialogContent } from "@/components/ui/dialog"; +import CommandMenu from "../nav/CommandMenu"; const Command = React.forwardRef< React.ElementRef, @@ -28,10 +29,11 @@ interface CommandDialogProps extends DialogProps {} const CommandDialog = ({ children, ...props }: CommandDialogProps) => { return ( - - + + + {/* {children} - + */} ); @@ -41,7 +43,10 @@ const CommandInput = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( -
+