From 1f768be0485bbfa6b542dd24183fe8389acb9355 Mon Sep 17 00:00:00 2001 From: Md Saban <45597394+mdsaban@users.noreply.github.com> Date: Sat, 12 Oct 2024 18:37:20 +0530 Subject: feature(web): Introduce a new sticky navbar. Fixes 520 (#515) * ui: add global header * fix: design fixes * fix: tests * fix navbar background, hide y scrollbar and change sidebar footer to show version --------- Co-authored-by: MohamedBassem --- apps/web/components/dashboard/sidebar/AllLists.tsx | 6 -- .../components/dashboard/sidebar/ModileSidebar.tsx | 4 +- apps/web/components/dashboard/sidebar/Sidebar.tsx | 34 +++-------- .../dashboard/sidebar/SidebarProfileOptions.tsx | 68 ---------------------- 4 files changed, 9 insertions(+), 103 deletions(-) delete mode 100644 apps/web/components/dashboard/sidebar/SidebarProfileOptions.tsx (limited to 'apps/web/components/dashboard/sidebar') diff --git a/apps/web/components/dashboard/sidebar/AllLists.tsx b/apps/web/components/dashboard/sidebar/AllLists.tsx index 15bed88a..b6cadea9 100644 --- a/apps/web/components/dashboard/sidebar/AllLists.tsx +++ b/apps/web/components/dashboard/sidebar/AllLists.tsx @@ -47,12 +47,6 @@ export default function AllLists({ path={`/dashboard/favourites`} linkClassName="py-0.5" /> - 🗄️} - name="Archive" - path={`/dashboard/archive`} - linkClassName="py-0.5" - /> { } path="/dashboard/lists" /> } path="/dashboard/tags" /> } path="/dashboard/settings" /> - + ); diff --git a/apps/web/components/dashboard/sidebar/Sidebar.tsx b/apps/web/components/dashboard/sidebar/Sidebar.tsx index 84a10d2d..13260e07 100644 --- a/apps/web/components/dashboard/sidebar/Sidebar.tsx +++ b/apps/web/components/dashboard/sidebar/Sidebar.tsx @@ -1,16 +1,13 @@ -import Link from "next/link"; import { redirect } from "next/navigation"; -import HoarderLogo from "@/components/HoarderIcon"; import { Separator } from "@/components/ui/separator"; import { api } from "@/server/api/client"; import { getServerAuthSession } from "@/server/auth"; -import { Home, Search, Settings, Shield, Tag } from "lucide-react"; +import { Archive, Home, Search, Tag } from "lucide-react"; import serverConfig from "@hoarder/shared/config"; import AllLists from "./AllLists"; import SidebarItem from "./SidebarItem"; -import SidebarProfileOptions from "./SidebarProfileOptions"; export default async function Sidebar() { const session = await getServerAuthSession(); @@ -30,17 +27,6 @@ export default async function Sidebar() { ] : []; - const adminItem = - session.user.role == "admin" - ? [ - { - name: "Admin", - icon: , - path: "/dashboard/admin", - }, - ] - : []; - const menu: { name: string; icon: JSX.Element; @@ -58,19 +44,14 @@ export default async function Sidebar() { path: "/dashboard/tags", }, { - name: "Settings", - icon: , - path: "/dashboard/settings", + name: "Archive", + icon: , + path: "/dashboard/archive", }, - ...adminItem, ]; return ( -