reading from openapi spec
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
||||
import TableViewIcon from '@mui/icons-material/TableView';
|
||||
import DashboardIcon from '@mui/icons-material/Dashboard';
|
||||
import LogoutIcon from '@mui/icons-material/Logout';
|
||||
import { config } from '../config';
|
||||
import { ResourceConfig } from '../types/config';
|
||||
|
||||
const drawerWidth = 240;
|
||||
|
||||
@@ -27,6 +27,7 @@ interface AdminLayoutProps {
|
||||
selectedResourceName: string | null;
|
||||
onLogout: () => void;
|
||||
username?: string;
|
||||
resources: ResourceConfig[];
|
||||
}
|
||||
|
||||
export default function AdminLayout({
|
||||
@@ -34,7 +35,8 @@ export default function AdminLayout({
|
||||
onSelectResource,
|
||||
selectedResourceName,
|
||||
onLogout,
|
||||
username
|
||||
username,
|
||||
resources,
|
||||
}: AdminLayoutProps) {
|
||||
return (
|
||||
<Box sx={{ display: 'flex' }}>
|
||||
@@ -77,7 +79,7 @@ export default function AdminLayout({
|
||||
</List>
|
||||
<Divider />
|
||||
<List>
|
||||
{config.resources.map((res) => (
|
||||
{resources.map((res) => (
|
||||
<ListItem key={res.name} disablePadding>
|
||||
<ListItemButton
|
||||
selected={selectedResourceName === res.name}
|
||||
|
||||
Reference in New Issue
Block a user