diff --git a/src/pages/DashBoard.tsx b/src/pages/DashBoard.tsx index 7799972..29482ef 100644 --- a/src/pages/DashBoard.tsx +++ b/src/pages/DashBoard.tsx @@ -12,7 +12,7 @@ import IconButton from '@mui/material/IconButton'; import MenuIcon from '@mui/icons-material/Menu'; import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; import RouteElement from './RouteElement'; -import {ListRouter} from './PageList'; +import {RouterList, NodeList} from './PageList'; import {Button} from '@mui/material'; import logo from '../assets/mu-zero-hyperloop-logo.png' import {invoke} from '@tauri-apps/api'; @@ -75,6 +75,8 @@ export default function Dashboard() { setOpen(!open); }; + const nodes = ["Hello", "World", "Test"] + return ( @@ -135,7 +137,8 @@ export default function Dashboard() { - {ListRouter} + {RouterList} + <>{open == true ? <> {NodeList(nodes)}: null} ) => { + preventSelection(event); + }; + + const handleExpansionClick = ( + event: React.MouseEvent, + ) => { + handleExpansion(event); + }; + + const handleSelectionClick = ( + event: React.MouseEvent, + ) => { + handleSelection(event); + }; + + return ( + // eslint-disable-next-line jsx-a11y/no-static-element-interactions +
} + > + {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */} +
+ {icon} +
+ + {label} + +
+ ); +}); + +const CustomTreeItem = React.forwardRef(function CustomTreeItem( + props: TreeItemProps, + ref: React.Ref, +) { + return ; +}); + + const Link = React.forwardRef(function Link( itemProps, ref, @@ -36,9 +117,30 @@ function ListItemButtonLink(props: ListItemLinkProps) { ); } -export const ListRouter = ( +export const RouterList = ( }/> }/> ); + +export function NodeList(nodes: string[]) { + return ( + + + } + defaultExpandIcon={} + > + {nodes.map((node) => + + + + )} + + + + + ); +}