()
| 43 | }] |
| 44 | |
| 45 | export function TopNav() { |
| 46 | let sideNavController = UseSideNavController(); |
| 47 | |
| 48 | let session = useSession(); |
| 49 | let currentGuild = useCurrentGuild(); |
| 50 | |
| 51 | const [anchorElNav, setAnchorElNav] = React.useState<null | HTMLElement>(null); |
| 52 | |
| 53 | const handleOpenNavMenu = (event: React.MouseEvent<HTMLElement>) => { |
| 54 | if (sideNavController.pageHasSideNav) { |
| 55 | sideNavController.open() |
| 56 | } else { |
| 57 | setAnchorElNav(event.currentTarget); |
| 58 | } |
| 59 | }; |
| 60 | |
| 61 | const handleCloseNavMenu = () => { |
| 62 | setAnchorElNav(null); |
| 63 | }; |
| 64 | |
| 65 | // const handleClickNavMenuItem = (page: typeof TopBarNavPages[number]) => { |
| 66 | // handleCloseNavMenu(); |
| 67 | |
| 68 | // if (!page.useHref) { |
| 69 | // navigate(page.path); |
| 70 | // } |
| 71 | // }; |
| 72 | |
| 73 | const drawerWidth = sideNavController.pageHasSideNav ? 250 : 0; |
| 74 | |
| 75 | return (<> |
| 76 | <AppBar position="static" |
| 77 | sx={{ |
| 78 | width: { md: `calc(100% - ${drawerWidth}px)` }, |
| 79 | ml: { md: `${drawerWidth}px` }, |
| 80 | }} |
| 81 | > |
| 82 | <Container maxWidth="xl"> |
| 83 | <Toolbar disableGutters> |
| 84 | {/* <AdbIcon sx={{ display: { xs: 'none', md: 'flex' }, mr: 1 }} /> */} |
| 85 | <Typography |
| 86 | variant="h6" |
| 87 | noWrap |
| 88 | component="a" |
| 89 | href="/" |
| 90 | sx={{ |
| 91 | mr: 2, |
| 92 | display: { xs: 'none', md: 'flex' }, |
| 93 | fontWeight: 700, |
| 94 | color: 'inherit', |
| 95 | textDecoration: 'none', |
| 96 | }} |
| 97 | > |
| 98 | Botloader |
| 99 | </Typography> |
| 100 | |
| 101 | <Box sx={{ flexGrow: 1, display: { xs: 'flex', md: 'none' } }}> |
| 102 | <IconButton |
nothing calls this directly
no test coverage detected