Fix build: move store import from admin-nav to layout only
Local Build and Deploy / deploy (push) Successful in 51s
Local Build and Deploy / deploy (push) Successful in 51s
admin-nav.ts was importing from store.ts (server-only), which caused build errors when admin-topbar.tsx (client component) pulled in admin-nav. Now layout.tsx directly imports from store and passes enabled state to allNavGroups().
This commit is contained in:
1 parent
127d5dcfa6
commit
c6a6653803
2 files changed
+4
-11
No files matched your search
@@ -18,7 +18,6 @@ import {
|
||||
Wrench,
|
||||
} from "lucide-react";
|
||||
import { pluginRegistry } from "@/lib/plugins";
|
||||
import { getAllPluginStates } from "@/lib/plugins/store";
|
||||
import "@/lib/plugins/loader";
|
||||
|
||||
export interface AdminHubTab {
|
||||
@@ -411,15 +410,7 @@ export function allNavGroups(enabled?: Record<string, boolean>): AdminNavGroup[]
|
||||
];
|
||||
}
|
||||
|
||||
export async function allEnabledHubs(): Promise<AdminHubDefinition[]> {
|
||||
const states = await getAllPluginStates();
|
||||
return allHubs(states.enabled);
|
||||
}
|
||||
|
||||
export async function allEnabledNavGroups(): Promise<AdminNavGroup[]> {
|
||||
const states = await getAllPluginStates();
|
||||
return allNavGroups(states.enabled);
|
||||
}
|
||||
|
||||
function hubPrefixes(id: string): string[] {
|
||||
return ADMIN_HUBS.find((h) => h.id === id)?.prefixes ?? [];
|
||||
|
||||
Reference in new issue
Block a user