From 9dfe9505249307b34b2e90c0a2180d703900e27c Mon Sep 17 00:00:00 2001 From: Riya Jain Date: Thu, 9 Jan 2025 15:19:00 +0000 Subject: [PATCH] Change navbar list usuage --- .../client/src/shared/components/Navbar.tsx | 65 +++++++++++++------ 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/packages/client/src/shared/components/Navbar.tsx b/packages/client/src/shared/components/Navbar.tsx index 4c16e3a..e7f1856 100644 --- a/packages/client/src/shared/components/Navbar.tsx +++ b/packages/client/src/shared/components/Navbar.tsx @@ -1,29 +1,54 @@ import Icon from "./Icon.tsx"; import Link from "./Link.tsx"; +import type { icons } from "lucide-preact"; + +type NavbarItem = { + iconName: keyof typeof icons; + name: string; + to: string; +}; export default function Navbar() { return (
- - -

Discover

- -
- -

Chat

-
- - -

PFRAX

- -
- -

Create

-
-
- -

Portfolio

-
+ {navbarList.map((item, key) => ( + + +

{item.name}

+ + ))}
); } + +const navbarList: NavbarItem[] = [ + { + iconName: "Gem", + name: "Discover", + to: "/discover", + }, + { + iconName: "MessagesSquare", + name: "Chat", + to: "/chat", + }, + { + iconName: "Touchpad", + name: "PFRAX", + to: "pfrax", + }, + { + iconName: "Plus", + name: "Create", + to: "create", + }, + { + iconName: "Wallet", + name: "Portfolio", + to: "portfolio", + }, +];