Files
tenext-next/data/navigation.ts
2026-08-03 14:42:01 +05:30

61 lines
1.4 KiB
TypeScript

import { services } from "@/data/site-content";
import { solutions, industries } from "@/data/site-pages";
export interface NavItem {
label: string;
href: string;
children?: NavItem[];
}
/** Builds dropdown entries from a content list so the menu tracks the page. */
function toNavItems(
items: { id: string; title: string }[],
basePath: string,
): NavItem[] {
return items.map((item) => ({
label: item.title,
href: `${basePath}#${item.id}`,
}));
}
export const navigationData: NavItem[] = [
{
label: "Home",
href: "/",
},
{
label: "About",
href: "/about",
children: [
{ label: "Company", href: "/about" },
{ label: "Our Mission", href: "/about#mission" },
{ label: "Our Teams", href: "/about#teams" },
{ label: "Careers", href: "/careers" },
],
},
{
label: "Services",
href: "/services",
children: toNavItems(services, "/services"),
},
{
label: "Solutions",
href: "/solutions",
children: toNavItems(solutions, "/solutions"),
},
{
label: "Industries",
href: "/industries",
children: toNavItems(industries, "/industries"),
},
{
label: "Insights",
href: "/case-studies",
children: [
{ label: "Case Studies", href: "/case-studies" },
{ label: "Resources", href: "/resources" },
{ label: "Contact", href: "/contacts" },
],
},
];