From 374bd87dca51d5ee8c9cc4c024ee6dc635ad67fd Mon Sep 17 00:00:00 2001 From: Nafiu Taiwo Date: Thu, 25 Jul 2024 18:48:06 +0100 Subject: [PATCH 1/4] feat: users navbar --- .../_components/layout/navbar/index.tsx | 125 ++++++++++++++++++ src/app/dashboard/(user-dashboard)/layout.tsx | 6 +- 2 files changed, 127 insertions(+), 4 deletions(-) create mode 100644 src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx diff --git a/src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx b/src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx new file mode 100644 index 000000000..337797f86 --- /dev/null +++ b/src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx @@ -0,0 +1,125 @@ +"use client"; + +import { + BellIcon, + ChevronDown, + HelpCircle, + Menu, + SearchIcon, +} from "lucide-react"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; + +import UnreadNotificationCard from "~/app/dashboard/(admin)/_components/unread-notification-card/UnreadNotificationCard"; +import Logo from "~/components/common/logo"; +import { Avatar, AvatarFallback, AvatarImage } from "~/components/ui/avatar"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "~/components/ui/popover"; + +const navlinks = [ + { + route: "Overview", + link: "/dashboard", + id: "dashboard", + }, + { + route: "Customers", + link: "/dashboard/customer", + id: "customers", + }, + { + route: "Products", + link: "/dashboard/products", + id: "products", + }, +]; + +const UserNavbar = () => { + const pathname = usePathname(); + const currentPath = pathname?.split("/")[2]; + return ( + + ); +}; + +export default UserNavbar; diff --git a/src/app/dashboard/(user-dashboard)/layout.tsx b/src/app/dashboard/(user-dashboard)/layout.tsx index 6c6e99f4d..4fbf16f44 100644 --- a/src/app/dashboard/(user-dashboard)/layout.tsx +++ b/src/app/dashboard/(user-dashboard)/layout.tsx @@ -1,6 +1,6 @@ import { Suspense } from "react"; -// import AdminNavbar from "~/components/superadminlayout/navbar/AdminNavbar"; +import UserNavbar from "./_components/layout/navbar"; export default function AdminLayout({ children, @@ -9,9 +9,7 @@ export default function AdminLayout({ }) { return (
- {/*
*/} - {/* */} - +
{children}
From df6edde220174d58601af2a87be9d8a34e2ed14b Mon Sep 17 00:00:00 2001 From: Nafiu Taiwo Date: Thu, 25 Jul 2024 18:50:49 +0100 Subject: [PATCH 2/4] feat: update --- src/app/(auth-routes)/login/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(auth-routes)/login/page.tsx b/src/app/(auth-routes)/login/page.tsx index 5216d09e8..85a65d8dc 100644 --- a/src/app/(auth-routes)/login/page.tsx +++ b/src/app/(auth-routes)/login/page.tsx @@ -25,8 +25,8 @@ import { import { Input } from "~/components/ui/input"; import { useUser } from "~/hooks/user/use-user"; import { simulateDelay } from "~/lib/utils"; -import Google from "../../../../public/images/google.svg"; import Facebook from "../../../../public/images/facebook.svg"; +import Google from "../../../../public/images/google.svg"; const loginSchema = z.object({ email: z.string().email({ message: "Invalid email format" }), From e5e7a112782acef4d717234df268b5b67eb329a2 Mon Sep 17 00:00:00 2001 From: Nafiu Taiwo Date: Thu, 25 Jul 2024 21:35:22 +0100 Subject: [PATCH 3/4] feat: settings layout --- .../_components/layout/navbar/index.tsx | 2 +- src/app/dashboard/(user-dashboard)/layout.tsx | 2 +- .../_components/layout/sidebar/index.tsx | 145 ++++++++++++++++++ .../settings/account/page.tsx | 5 + .../settings/data-and-privacy/page.tsx | 5 + .../settings/language-and-region/page.tsx | 5 + .../(user-dashboard)/settings/layout.tsx | 17 ++ .../settings/notification/page.tsx | 5 + .../organization/integrations/page.tsx | 5 + .../settings/organization/members/page.tsx | 5 + .../roles-and-permissions/page.tsx | 5 + .../settings/payment-information/page.tsx | 5 + 12 files changed, 204 insertions(+), 2 deletions(-) create mode 100644 src/app/dashboard/(user-dashboard)/settings/_components/layout/sidebar/index.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/account/page.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/data-and-privacy/page.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/language-and-region/page.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/layout.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/notification/page.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/organization/integrations/page.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/organization/members/page.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/organization/roles-and-permissions/page.tsx create mode 100644 src/app/dashboard/(user-dashboard)/settings/payment-information/page.tsx diff --git a/src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx b/src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx index 337797f86..6276f88ab 100644 --- a/src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx +++ b/src/app/dashboard/(user-dashboard)/_components/layout/navbar/index.tsx @@ -42,7 +42,7 @@ const UserNavbar = () => { const currentPath = pathname?.split("/")[2]; return (