refactor(admin): extract page titles into a shared constants file

This commit is contained in:
2026-04-22 17:43:23 -04:00
parent 51adae4e0f
commit 94aaeb241b
3 changed files with 16 additions and 8 deletions
+5 -4
View File
@@ -1,12 +1,13 @@
'use client';
import { registerPage } from '../registry.js';
import { PAGE_TITLES } from './titles.js';
import DashboardPage from './DashboardPage.client.js';
import UsersPage from './UsersPage.client.js';
import RolesPage from './RolesPage.client.js';
import ProfilePage from './ProfilePage.client.js';
registerPage({ slug: 'dashboard', Component: DashboardPage, title: 'Tableau de bord' });
registerPage({ slug: 'users', Component: UsersPage, title: 'Utilisateurs' });
registerPage({ slug: 'roles', Component: RolesPage, title: 'Rôles' });
registerPage({ slug: 'profile', Component: ProfilePage, title: 'Mon profil' });
registerPage({ slug: 'dashboard', Component: DashboardPage, title: PAGE_TITLES.dashboard });
registerPage({ slug: 'users', Component: UsersPage, title: PAGE_TITLES.users });
registerPage({ slug: 'roles', Component: RolesPage, title: PAGE_TITLES.roles });
registerPage({ slug: 'profile', Component: ProfilePage, title: PAGE_TITLES.profile });
+6
View File
@@ -0,0 +1,6 @@
export const PAGE_TITLES = {
dashboard: 'Tableau de bord',
profile: 'Mon profil',
users: 'Utilisateurs',
roles: 'Rôles',
};