|
| 1 | +import { navConfig } from "@/config/navigation"; |
| 2 | +import { H6 } from "@/packages/ui"; |
1 | 3 | import Link from "next/link"; |
2 | 4 |
|
3 | | -const navItems = [ |
4 | | - { title: "Getting Started", route: "/components" }, |
5 | | - { title: "Accordions", route: "/components/accordions" }, |
6 | | - { title: "Avatars", route: "/components/avatars" }, |
7 | | - // { title: "Badges", route: "/components/badges" }, |
8 | | - { title: "Buttons", route: "/components/buttons" }, |
9 | | - { title: "Cards", route: "/components/cards" }, |
10 | | - { title: "Inputs", route: "/components/inputs" }, |
11 | | - { title: "Textareas", route: "/components/textareas" }, |
12 | | - { title: "Typography", route: "/components/typography" }, |
13 | | -]; |
14 | | - |
15 | 5 | export default function SideNav() { |
16 | 6 | return ( |
17 | 7 | <div |
18 | 8 | className={`fixed top-16 left-0 border-r-2 border-black h-full transition-transform transform md:translate-x-0 w-64 bg-white z-50`} |
19 | 9 | > |
20 | | - <nav className="flex flex-col items-start p-6 space-y-2"> |
21 | | - {navItems.map((item) => ( |
22 | | - <Link key={item.route} href={item.route}> |
23 | | - {item.title} |
24 | | - </Link> |
| 10 | + <nav className="flex flex-col items-start p-6 space-y-4"> |
| 11 | + {navConfig.sideNavItems.map((item) => ( |
| 12 | + <div key={item.title}> |
| 13 | + <H6>{item.title}</H6> |
| 14 | + <div className="flex flex-col space-y-2"> |
| 15 | + {item.children.map((child) => ( |
| 16 | + <Link key={child.title} href={child.href}> |
| 17 | + {child.title} |
| 18 | + </Link> |
| 19 | + ))} |
| 20 | + </div> |
| 21 | + </div> |
25 | 22 | ))} |
26 | 23 | </nav> |
27 | 24 | </div> |
|
0 commit comments