fixed urls (hardcoded /admin) to admin navigation
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user