feat(#112): remove admin tabs, sidebar handles navigation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,29 +1,9 @@
|
|||||||
import { Outlet, useNavigate, useLocation } from 'react-router';
|
import { Outlet } from 'react-router';
|
||||||
import { Tabs } from '@cameleer/design-system';
|
|
||||||
|
|
||||||
const ADMIN_TABS = [
|
|
||||||
{ label: 'User Management', value: '/admin/rbac' },
|
|
||||||
{ label: 'Audit Log', value: '/admin/audit' },
|
|
||||||
{ label: 'OIDC', value: '/admin/oidc' },
|
|
||||||
{ label: 'App Config', value: '/admin/appconfig' },
|
|
||||||
{ label: 'Database', value: '/admin/database' },
|
|
||||||
{ label: 'ClickHouse', value: '/admin/clickhouse' },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function AdminLayout() {
|
export default function AdminLayout() {
|
||||||
const navigate = useNavigate();
|
|
||||||
const location = useLocation();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
|
||||||
<Tabs
|
|
||||||
tabs={ADMIN_TABS}
|
|
||||||
active={location.pathname}
|
|
||||||
onChange={(path) => navigate(path)}
|
|
||||||
/>
|
|
||||||
<div style={{ padding: '20px 24px 40px' }}>
|
<div style={{ padding: '20px 24px 40px' }}>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user