0106bc4ea0
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
33 lines
984 B
JavaScript
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>
|
|
);
|
|
}
|