main
Last change
on this file since 87c9f1e was 87c9f1e, checked in by Naum Shapkarovski <naumshapkarovski@…>, 5 weeks ago |
update the seed script. update the prisma schema, use mapping
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[5d6f37a] | 1 | // @mui
|
---|
| 2 | import Box from '@mui/material/Box';
|
---|
| 3 | import Stack from '@mui/material/Stack';
|
---|
| 4 | // theme
|
---|
| 5 | import { hideScroll } from 'src/theme/css';
|
---|
| 6 | // auth
|
---|
| 7 | import { useAuthContext } from 'src/auth/hooks';
|
---|
| 8 | // components
|
---|
| 9 | import Logo from 'src/components/logo';
|
---|
| 10 | import { NavSectionMini } from 'src/components/nav-section';
|
---|
| 11 | //
|
---|
| 12 | import { NAV } from '../config-layout';
|
---|
| 13 | import { useNavData } from './config-navigation';
|
---|
| 14 | import { NavToggleButton } from '../_common';
|
---|
| 15 |
|
---|
| 16 | // ----------------------------------------------------------------------
|
---|
| 17 |
|
---|
| 18 | export default function NavMini() {
|
---|
| 19 | const { user } = useAuthContext();
|
---|
| 20 |
|
---|
| 21 | const navData = useNavData();
|
---|
| 22 |
|
---|
| 23 | return (
|
---|
| 24 | <Box
|
---|
| 25 | component="nav"
|
---|
| 26 | sx={{
|
---|
| 27 | flexShrink: { lg: 0 },
|
---|
| 28 | width: { lg: NAV.W_MINI },
|
---|
| 29 | }}
|
---|
| 30 | >
|
---|
| 31 | <NavToggleButton
|
---|
| 32 | sx={{
|
---|
| 33 | top: 22,
|
---|
| 34 | left: NAV.W_MINI - 12,
|
---|
| 35 | }}
|
---|
| 36 | />
|
---|
| 37 |
|
---|
| 38 | <Stack
|
---|
| 39 | sx={{
|
---|
| 40 | pb: 2,
|
---|
| 41 | height: 1,
|
---|
| 42 | position: 'fixed',
|
---|
| 43 | width: NAV.W_MINI,
|
---|
| 44 | borderRight: (theme) => `dashed 1px ${theme.palette.divider}`,
|
---|
| 45 | ...hideScroll.x,
|
---|
| 46 | }}
|
---|
| 47 | >
|
---|
| 48 | <Logo sx={{ mx: 'auto', my: 2 }} />
|
---|
| 49 |
|
---|
| 50 | <NavSectionMini
|
---|
| 51 | data={navData}
|
---|
| 52 | config={{
|
---|
[87c9f1e] | 53 | currentRole: user?.role || 'ADMIN',
|
---|
[5d6f37a] | 54 | }}
|
---|
| 55 | />
|
---|
| 56 | </Stack>
|
---|
| 57 | </Box>
|
---|
| 58 | );
|
---|
| 59 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.