From 6f10d173c08f80f79b4cf511de407d039ea4dbcb Mon Sep 17 00:00:00 2001 From: Tania Gutierrez Date: Wed, 13 Mar 2024 21:49:04 -0400 Subject: [PATCH] feat: Added user dropdown and active navbar item state --- app/components/general-layout.tsx | 42 ++++++++++++++++++++++++------- package.json | 5 ++-- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/app/components/general-layout.tsx b/app/components/general-layout.tsx index be41b25..337dd39 100644 --- a/app/components/general-layout.tsx +++ b/app/components/general-layout.tsx @@ -2,7 +2,7 @@ import { Button } from "~/components/ui/button" import logoPng from "~/images/lume-logo.png?url" import lumeColorLogoPng from "~/images/lume-color-logo.png?url" import discordLogoPng from "~/images/discord-logo.png?url" -import { Link } from "@remix-run/react" +import { Link, useLocation } from "@remix-run/react" import { Dialog, DialogContent, @@ -14,7 +14,7 @@ import { useUppy } from "./lib/uppy" import type { UppyFile } from "@uppy/core" import { Progress } from "~/components/ui/progress" import { DialogClose } from "@radix-ui/react-dialog" -import { TrashIcon } from "@radix-ui/react-icons" +import { ChevronDownIcon, TrashIcon } from "@radix-ui/react-icons" import { ClockIcon, DriveIcon, @@ -22,10 +22,15 @@ import { CloudUploadIcon, CloudCheckIcon, BoxCheckedIcon, - PageIcon + PageIcon, + ThemeIcon } from "./icons" +import { DropdownMenu, DropdownMenuTrigger } from "./ui/dropdown-menu" +import { Avatar } from "@radix-ui/react-avatar" +import { cn } from "~/utils" export const GeneralLayout = ({ children }: React.PropsWithChildren<{}>) => { + const location = useLocation(); return (
@@ -35,7 +40,7 @@ export const GeneralLayout = ({ children }: React.PropsWithChildren<{}>) => {
  • - + Dashboard @@ -43,7 +48,7 @@ export const GeneralLayout = ({ children }: React.PropsWithChildren<{}>) => {
  • - + File Manager @@ -51,7 +56,7 @@ export const GeneralLayout = ({ children }: React.PropsWithChildren<{}>) => {
  • - + Account @@ -71,13 +76,29 @@ export const GeneralLayout = ({ children }: React.PropsWithChildren<{}>) => { Upload Files - +
+
+ + + + + + + +
+ {children}