import * as React from 'react'; import Tabs from '@mui/material/Tabs'; import Tab from '@mui/material/Tab'; import Box from '@mui/material/Box'; import { useNavigate, useParams } from 'react-router'; import WikiSpacePermissionSettings from './WikiSpacePermissionSettings'; import { Stack } from '@mui/material'; const tabs = [ { label: "Permissions", path: "permissions", component: }, ] interface TabPanelProps { children?: React.ReactNode; tabPath: string; value: string; } function TabPanel(props: TabPanelProps) { const { children, value, tabPath, ...other } = props; return ( ); } function a11yProps(index: number) { return { 'aria-controls': `settings-panel-${index}`, id: `settings-tab-${index}`, }; } export default function WikiSpaceSettingsPage() { const navigate = useNavigate(); const handleChange = (event: React.SyntheticEvent, newValue: number) => { navigate(newValue); }; const params = useParams(); console.log('switching to', params) return ( {/* */} {tabs.map(({ label, path }, key) => )} {/* */} {tabs.map(({ label, path, component }, key) => {component})} ); }