"use client"; // Fonts import { vipnagorgialla } from "@/components/Vipnagorgialla"; // Use effect to handle route changes and close the sidebar if it's open // usePathName to listen to route changes in Next.js import { useEffect } from "react"; import { usePathname } from "next/navigation"; import Link from "next/link"; const Sidebar = ({ isOpen, toggleSidebar, }: { isOpen: boolean; toggleSidebar: () => void; }) => { const pathname = usePathname(); useEffect(() => { if (isOpen) { toggleSidebar(); } }, [pathname]); return ( <>