fixed urls (hardcoded /admin) to admin navigation

This commit is contained in:
2026-04-07 11:26:56 +05:30
parent 00c8da629c
commit 69c9fd6bef
3 changed files with 14 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ function Dashboard({ basePath }: { basePath: string }) {
transition: 'transform 0.2s',
'&:hover': { transform: 'translateY(-4px)', boxShadow: 4 }
}}
onClick={() => navigate(`${basePath}/${res.name}`)}
onClick={() => navigate(`/admin/${res.name}`)}
>
<Typography variant="h6" color="primary">{res.pluralLabel}</Typography>
<Typography variant="body2" color="text.secondary">Manage {res.pluralLabel.toLowerCase()}</Typography>
@@ -88,7 +88,7 @@ function AdminApp({ basePath }: { basePath: string }) {
<AdminLayout
username={currentUser.username}
onLogout={logout}
onSelectResource={(name) => navigate(`${basePath}/${name}`)}
onSelectResource={(name) => navigate(`/admin/${name}`)}
resources={config?.resources || []}
>
<Routes>