Skip to content

Commit

Permalink
feat: add admin link to the navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
davitJabushanuri committed May 6, 2024
1 parent 04b7ea2 commit dae3656
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/features/navbar/assets/dashboard-icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const DashboardIcon = () => {
return (
<svg viewBox="0 0 24 24" aria-hidden="true">
<g>
<path d="M5 5c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2H5zm2.5 5.75c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zM11 13h7v-2h-7v2zm0 4h4v-2h-4v2zm8.5-10C20.88 7 22 8.12 22 9.5v9c0 1.38-1.12 2.5-2.5 2.5h-15C3.12 21 2 19.88 2 18.5v-9C2 8.12 3.12 7 4.5 7h15zM4 18.5c0 .28.22.5.5.5h15c.28 0 .5-.22.5-.5v-9c0-.28-.22-.5-.5-.5h-15c-.28 0-.5.22-.5.5v9z"></path>
</g>
</svg>
);
};
11 changes: 11 additions & 0 deletions src/features/navbar/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Tooltip } from "@/components/elements/tooltip";

import { BellActive, Bell } from "../assets/bell-icon";
import { Bookmark, BookmarkActive } from "../assets/bookmark-icon";
import { DashboardIcon } from "../assets/dashboard-icon";
import { Envelope, EnvelopeActive } from "../assets/envelope-icon";
import { Gear, GearActive } from "../assets/gear-icon";
import { Hashtag, HashtagActive } from "../assets/hashtag-icon";
Expand All @@ -23,6 +24,16 @@ export const Navbar = () => {
aria-label="Primary"
className="flex flex-col items-center xxl:items-start"
>
<Tooltip text="Home" maxWidth={1300}>
<NavItem
href={`/admin`}
icon={pathname === `/admin` ? <DashboardIcon /> : <DashboardIcon />}
text="Dashboard"
aria-label="Admin Dashboard"
isActive={pathname === `/admin`}
/>
</Tooltip>

{session && (
<Tooltip text="Home" maxWidth={1300}>
<NavItem
Expand Down

0 comments on commit dae3656

Please sign in to comment.