feat(admin): replace prop-based page title with context provider

This commit is contained in:
2026-04-22 17:58:04 -04:00
parent 18e0cb3486
commit 843f992b1f
3 changed files with 42 additions and 20 deletions
+3 -1
View File
@@ -6,9 +6,11 @@ import { ChevronDownIcon, User03Icon, DashboardSquare03Icon } from '@zen/core/sh
import { UserAvatar } from '@zen/core/shared/components';
import { useRouter, usePathname } from 'next/navigation';
import { getPages } from '../registry.js';
import { useAdminPageTitle } from './AdminPageTitleContext.js';
import { useTheme, getThemeIcon } from '@zen/core/themes';
const AdminTop = ({ isMobileMenuOpen, setIsMobileMenuOpen, user, onLogout, appName = 'ZEN', navigationSections = [], currentPageTitle }) => {
const AdminTop = ({ isMobileMenuOpen, setIsMobileMenuOpen, user, onLogout, appName = 'ZEN', navigationSections = [] }) => {
const { title: currentPageTitle } = useAdminPageTitle();
const router = useRouter();
const pathname = usePathname();