feat(MED-97): fix /home/[account] and /admin* routes layout consistencies

This commit is contained in:
2025-09-23 19:22:40 +03:00
parent f0853409c8
commit 3212b52b02
13 changed files with 102 additions and 148 deletions

View File

@@ -0,0 +1,33 @@
import { LayoutDashboard, Users } from 'lucide-react';
import { z } from 'zod';
import { pathsConfig } from '@kit/shared/config';
import { NavigationConfigSchema } from '@kit/ui/navigation-schema';
const iconClasses = 'w-4 stroke-[1.5px]';
const routes = [
{
children: [
{
label: 'Dashboard',
path: pathsConfig.app.admin,
Icon: <LayoutDashboard className={iconClasses} />,
end: true,
},
{
label: 'Accounts',
path: `${pathsConfig.app.admin}/accounts`,
Icon: <Users className={iconClasses} />,
end: true,
},
],
},
] satisfies z.infer<typeof NavigationConfigSchema>['routes'];
export const adminNavigationConfig = NavigationConfigSchema.parse({
routes,
style: 'custom',
sidebarCollapsed: false,
sidebarCollapsedStyle: 'icon',
});

View File

@@ -1,6 +1,7 @@
import appConfig from './app.config';
import authConfig from './auth.config';
import billingConfig from './billing.config';
import { adminNavigationConfig } from './admin-navigation.config';
import {
DynamicAuthConfig,
getCachedAuthConfig,
@@ -15,6 +16,7 @@ import {
} from './team-account-navigation.config';
export {
adminNavigationConfig,
appConfig,
authConfig,
billingConfig,

View File

@@ -7,7 +7,6 @@ const iconClasses = 'w-4';
const getRoutes = (account: string) => [
{
label: 'common:routes.application',
children: [
{
label: 'common:routes.dashboard',
@@ -15,12 +14,6 @@ const getRoutes = (account: string) => [
Icon: <LayoutDashboard className={iconClasses} />,
end: true,
},
],
},
{
label: 'common:routes.settings',
collapsible: false,
children: [
{
label: 'common:routes.settings',
path: createPath(pathsConfig.app.accountSettings, account),