feat(navigation): add extensible others menus

This commit is contained in:
Poyraz
2026-08-29 16:59:57 +03:00
parent 913fc90585
commit 13cafffa5d
7 changed files with 387 additions and 92 deletions
+17 -1
View File
@@ -10,7 +10,7 @@ import {
import { REFERENCES } from "@/data/references";
import { VOLUNTEER_COMMUNITY_ITEMS } from "@/data/volunteer-community";
import { YOUTUBE_VIDEO_LINKS } from "@/data/youtube-videos";
import { NAV_LINKS, SOCIAL_LINKS } from "@/lib/links";
import { NAV_DROPDOWN_GROUPS, NAV_LINKS, SOCIAL_LINKS } from "@/lib/links";
import { getLocalizedValue } from "@/lib/locale";
export type CommandPaletteItem = {
@@ -62,6 +62,21 @@ export function getCommandPaletteGroups(
],
}));
const dropdownGroups: CommandPaletteGroup[] = NAV_DROPDOWN_GROUPS.map(
(group) => ({
id: `navigation-${group.id}`,
heading: tNav.has(group.id) ? tNav(group.id) : group.label,
items: group.items.map((item) => ({
id: item.id,
label: tNav.has(item.id) ? tNav(item.id) : item.label,
href: item.href,
icon: item.icon,
external: item.external,
keywords: [group.label, item.label, ...item.keywords],
})),
}),
);
const blogItems: CommandPaletteItem[] = [
{
id: "blog-index",
@@ -281,6 +296,7 @@ export function getCommandPaletteGroups(
heading: locale === "tr" ? "İçerikler" : "Contents",
items: contentItems,
},
...dropdownGroups,
{
id: "social",
heading: "Social",