Unify the dashboard experience and retire the multi-theme engine so onboarding and day-to-day invoicing feel consistent and easier to maintain.
Shared layout, tabs, and sidebar timer; user onboarding and registration polish; settings danger zone and data export; chart and tRPC perf fixes; migrations for onboarding and dropped appearance columns. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,6 +32,19 @@ export function isNavLinkActive(pathname: string, href: string): boolean {
|
||||
return pathname === href;
|
||||
}
|
||||
|
||||
const ADMIN_ONLY_HREFS = new Set(["/dashboard/administration"]);
|
||||
|
||||
export function getNavigationForUser(isAdmin: boolean): NavSection[] {
|
||||
return navigationConfig
|
||||
.map((section) => ({
|
||||
...section,
|
||||
links: section.links.filter(
|
||||
(link) => isAdmin || !ADMIN_ONLY_HREFS.has(link.href),
|
||||
),
|
||||
}))
|
||||
.filter((section) => section.links.length > 0);
|
||||
}
|
||||
|
||||
export const navigationConfig: NavSection[] = [
|
||||
{
|
||||
title: "Main",
|
||||
|
||||
Reference in New Issue
Block a user