diff --git a/public/admin-dashboard/icons/arrowUp.svg b/public/admin-dashboard/icons/arrowUp.svg new file mode 100644 index 000000000..8d1856ede --- /dev/null +++ b/public/admin-dashboard/icons/arrowUp.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/admin-dashboard/icons/box.svg b/public/admin-dashboard/icons/box.svg new file mode 100644 index 000000000..a07b9e2de --- /dev/null +++ b/public/admin-dashboard/icons/box.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/admin-dashboard/icons/dollarSign.svg b/public/admin-dashboard/icons/dollarSign.svg new file mode 100644 index 000000000..a6c75e629 --- /dev/null +++ b/public/admin-dashboard/icons/dollarSign.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/admin-dashboard/icons/user.svg b/public/admin-dashboard/icons/user.svg new file mode 100644 index 000000000..5a3075414 --- /dev/null +++ b/public/admin-dashboard/icons/user.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/app/dashboard/(admin)/_components/layout/Sidebar/index.tsx b/src/app/dashboard/(admin)/_components/layout/Sidebar/index.tsx index 8a5c04adf..715c4ce55 100644 --- a/src/app/dashboard/(admin)/_components/layout/Sidebar/index.tsx +++ b/src/app/dashboard/(admin)/_components/layout/Sidebar/index.tsx @@ -1,6 +1,14 @@ "use client"; -import { Box, House, LucideProps, Mail, Settings, Users } from "lucide-react"; +import { + Box, + House, + List, + LucideProps, + Mail, + Settings, + Users, +} from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { FC, ForwardRefExoticComponent, RefAttributes } from "react"; @@ -10,43 +18,43 @@ import DashboardLogo from "../logo"; const sideItems = [ { route: "Dashboard", - link: "/admin/dashboard", + link: "/dashboard/admin/dashboard", icon: House, id: "dashboard", }, { route: "Products", - link: "/admin/products", + link: "/dashboard/admin/products", icon: Box, id: "products", }, { route: "Users", - link: "/admin/users", + link: "/dashboard/admin/users", icon: Users, id: "users", }, { route: "Email Templates", - link: "/admin/email", + link: "/dashboard/admin/email", icon: Mail, id: "email", }, { route: "Squeeze Pages", - link: "/admin/squeeze-pages", + link: "/dashboard/admin/squeeze-pages", icon: Users, id: "squeeze", }, { route: "Waitlist Page", - link: "/admin/waitlist-page", - icon: Mail, + link: "/dashboard/admin/waitlist-page", + icon: List, id: "waitlist", }, { route: "Settings", - link: "/admin/settings", + link: "/dashboard/admin/settings", icon: Settings, id: "settings", }, @@ -67,18 +75,19 @@ const Sidebar: FC = ({ currenPathName, }) => { const pathname = usePathname(); - const currentPath = pathname?.split("/")[2]; + const currentPath = pathname?.split("/")[3]; + return ( -
+
-
+
{sideNavitems.map((item, index) => ( {item.route} diff --git a/src/app/dashboard/(admin)/_components/layout/Sidebar/sidebar.test.tsx b/src/app/dashboard/(admin)/_components/layout/Sidebar/sidebar.test.tsx index 4c35021e9..9a0355ec8 100644 --- a/src/app/dashboard/(admin)/_components/layout/Sidebar/sidebar.test.tsx +++ b/src/app/dashboard/(admin)/_components/layout/Sidebar/sidebar.test.tsx @@ -1,48 +1,48 @@ -import Sidebar from "."; -import { Box, House, Mail, Settings, Users } from "lucide-react"; +import { Box, House, List, Mail, Settings, Users } from "lucide-react"; import { render, screen } from "~/test/utils"; +import Sidebar from "./index"; const sideItems = [ { route: "Dashboard", - link: "/admin/dashboard", + link: "/dashboard/admin/dashboard", icon: House, id: "dashboard", }, { route: "Products", - link: "/admin/products", + link: "/dashboard/admin/products", icon: Box, id: "products", }, { route: "Users", - link: "/admin/users", + link: "/dashboard/admin/users", icon: Users, id: "users", }, { route: "Email Templates", - link: "/admin/email", + link: "/dashboard/admin/email", icon: Mail, id: "email", }, { route: "Squeeze Pages", - link: "/admin/squeeze-pages", + link: "/dashboard/admin/squeeze-pages", icon: Users, id: "squeeze", }, { route: "Waitlist Page", - link: "/admin/waitlist-page", - icon: Mail, + link: "/dashboard/admin/waitlist-page", + icon: List, id: "waitlist", }, { route: "Settings", - link: "/admin/settings", + link: "/dashboard/admin/settings", icon: Settings, id: "settings", }, diff --git a/src/app/dashboard/(admin)/_components/layout/navbar/index.tsx b/src/app/dashboard/(admin)/_components/layout/navbar/index.tsx index 5b8f3d713..8c2ba1c8e 100644 --- a/src/app/dashboard/(admin)/_components/layout/navbar/index.tsx +++ b/src/app/dashboard/(admin)/_components/layout/navbar/index.tsx @@ -10,8 +10,11 @@ import UnreadNotificationCard from "../../unread-notification-card/UnreadNotific const DashboardNavbar = () => { return ( -