feat(admin): sync page title to admin shell via context

This commit is contained in:
2026-04-22 17:58:13 -04:00
parent 3edc7267d8
commit b3e88989de
2 changed files with 10 additions and 5 deletions
+1 -4
View File
@@ -2,7 +2,7 @@ import AdminShell from './components/AdminShell.js';
import AdminPageClient from './AdminPage.client.js';
import { protectAdmin } from './protect.js';
import { buildNavigationSections } from './navigation.js';
import { collectWidgetData, getPage } from './registry.js';
import { collectWidgetData } from './registry.js';
import { logoutAction } from '@zen/core/features/auth/actions';
import { getAppName } from '@zen/core';
import './widgets/index.server.js';
@@ -14,8 +14,6 @@ export default async function AdminPage({ params }) {
const widgetData = await collectWidgetData();
const navigationSections = buildNavigationSections('/');
const slug = resolvedParams?.admin?.[0] || 'dashboard';
const currentPageTitle = getPage(slug)?.title;
return (
<AdminShell
@@ -23,7 +21,6 @@ export default async function AdminPage({ params }) {
onLogout={logoutAction}
appName={appName}
navigationSections={navigationSections}
currentPageTitle={currentPageTitle}
>
<AdminPageClient
params={resolvedParams}