Files
core/src/features/admin/AdminPage.server.js
T
hykocx 0106bc4ea0 feat(core)!: introduce runtime extension registry and flat module conventions
BREAKING CHANGE: sup config now derives entries from package.json#exports and a server/client glob instead of manual lists; module structure follows flat + barrel convention with .server.js/.client.js runtime suffixes
2026-04-22 14:13:30 -04:00

33 lines
984 B
JavaScript

import AdminShell from './components/AdminShell.js';
import AdminPageClient from './AdminPage.client.js';
import { protectAdmin } from './protect.js';
import { buildNavigationSections } from './navigation.js';
import { collectWidgetData } from './registry.js';
import { logoutAction } from '@zen/core/features/auth/actions';
import { getAppName } from '@zen/core';
import './widgets/index.server.js';
export default async function AdminPage({ params }) {
const resolvedParams = await params;
const session = await protectAdmin();
const appName = getAppName();
const widgetData = await collectWidgetData();
const navigationSections = buildNavigationSections('/');
return (
<AdminShell
user={session.user}
onLogout={logoutAction}
appName={appName}
navigationSections={navigationSections}
>
<AdminPageClient
params={resolvedParams}
user={session.user}
widgetData={widgetData}
/>
</AdminShell>
);
}