Improve admin save UX and portfolio navigation
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-07 19:20:58 +01:00
parent 3d1976a7a5
commit ee21e8b823
19 changed files with 652 additions and 424 deletions
+23 -30
View File
@@ -24,6 +24,7 @@ export type RootNavItem = {
href: string;
icon: LucideIcon;
active?: boolean;
expanded?: boolean;
children?: RootNavItem[];
};
@@ -67,36 +68,28 @@ export function getRootNavigation(
label: copy.portfolio,
href: "/root/portfolio",
icon: FolderKanban,
active: active === "portfolio",
children:
active === "portfolio"
? [
{
label: "Overview",
href: "/root/portfolio",
icon: LayoutDashboard,
active: portfolioChild === "overview",
},
{
label: "Add Project",
href: "/root/portfolio/projects/new",
icon: PlusSquare,
active: portfolioChild === "new-project",
},
{
label: "Add Category",
href: "/root/portfolio/categories",
icon: Tags,
active: portfolioChild === "categories",
},
{
label: "Projects",
href: "/root/portfolio/projects",
icon: FolderKanban,
active: portfolioChild === "projects",
},
].filter((item, index, array) => array.findIndex((entry) => entry.href === item.href) === index)
: undefined,
active: active === "portfolio" && !portfolioChild,
expanded: active === "portfolio",
children: [
{
label: "Overview",
href: "/root/portfolio",
icon: LayoutDashboard,
active: portfolioChild === "overview",
},
{
label: "Add Project",
href: "/root/portfolio/projects/new",
icon: PlusSquare,
active: portfolioChild === "new-project",
},
{
label: "Add Category",
href: "/root/portfolio/categories",
icon: Tags,
active: portfolioChild === "categories",
},
].filter((item, index, array) => array.findIndex((entry) => entry.href === item.href) === index),
},
];
}