diff --git a/components/layout/mobile-nav.tsx b/components/layout/mobile-nav.tsx new file mode 100644 index 0000000..9b74aad --- /dev/null +++ b/components/layout/mobile-nav.tsx @@ -0,0 +1,69 @@ +"use client"; + +import React from "react"; +import { Sheet, SheetClose, SheetContent, SheetTrigger } from "@/components/ui/sheet"; +import Image from "next/image"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { sidebarLinks } from "@/constants"; +import { cn } from "@/lib/utils"; + +type Props = {}; + +const MobileNav = (props: Props) => { + const pathname = usePathname(); + return ( +
+ + + hamburger icon + + + + Yoom +

Yoom

+ + +
+ +
+ {sidebarLinks.map(link => { + const isActive = pathname === link.route || pathname.startsWith(`${link.route}/`); + + return ( + + + {link.label} +

{link.label}

+ +
+ ); + })} +
+
+
+
+
+
+ ); +}; + +export default MobileNav; diff --git a/components/layout/navbar.tsx b/components/layout/navbar.tsx index 3d6f39b..c531a78 100644 --- a/components/layout/navbar.tsx +++ b/components/layout/navbar.tsx @@ -1,9 +1,30 @@ +import Image from "next/image"; +import Link from "next/link"; import React from "react"; +import MobileNav from "./mobile-nav"; type Props = {}; const Navbar = (props: Props) => { - return
Navbar
; + return ( + + ); }; export default Navbar;