diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 5ace748..5712904 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -11,6 +11,16 @@ import { useRouter } from "next/navigation"; import translation from "@/translation/navbar.json"; import contacts from "@/contacts.json"; +interface Item { + page: string; + key: string; + entries?: { + key: string; + label: string; + }[]; + +} + const items = [ { page: "/", key: "home" }, { page: "/services", key: "services" }, @@ -26,7 +36,7 @@ const items = [ label: data.label, })), }, -]; +] as Item[]; export default function Navbar({ currentPage, @@ -36,6 +46,46 @@ export default function Navbar({ language: "en" | "ar"; }) { const [isOpen, setIsOpen] = useState(false); + + const renderItem = (item: Item, className: string) => { + if (item.entries) { + return ( +