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.2 KB
|
Line | |
---|
1 | import { memo } from 'react';
|
---|
2 | // @mui
|
---|
3 | import { useTheme } from '@mui/material/styles';
|
---|
4 | import AppBar from '@mui/material/AppBar';
|
---|
5 | import Toolbar from '@mui/material/Toolbar';
|
---|
6 | // theme
|
---|
7 | import { bgBlur } from 'src/theme/css';
|
---|
8 | // auth
|
---|
9 | import { useAuthContext } from 'src/auth/hooks';
|
---|
10 | // components
|
---|
11 | import { NavSectionHorizontal } from 'src/components/nav-section';
|
---|
12 | //
|
---|
13 | import { HEADER } from '../config-layout';
|
---|
14 | import { useNavData } from './config-navigation';
|
---|
15 | import { HeaderShadow } from '../_common';
|
---|
16 |
|
---|
17 | // ----------------------------------------------------------------------
|
---|
18 |
|
---|
19 | function NavHorizontal() {
|
---|
20 | const theme = useTheme();
|
---|
21 |
|
---|
22 | const { user } = useAuthContext();
|
---|
23 |
|
---|
24 | const navData = useNavData();
|
---|
25 |
|
---|
26 | return (
|
---|
27 | <AppBar
|
---|
28 | component="nav"
|
---|
29 | sx={{
|
---|
30 | top: HEADER.H_DESKTOP_OFFSET,
|
---|
31 | }}
|
---|
32 | >
|
---|
33 | <Toolbar
|
---|
34 | sx={{
|
---|
35 | ...bgBlur({
|
---|
36 | color: theme.palette.background.default,
|
---|
37 | }),
|
---|
38 | }}
|
---|
39 | >
|
---|
40 | <NavSectionHorizontal
|
---|
41 | data={navData}
|
---|
42 | config={{
|
---|
43 | currentRole: user?.role || 'ADMIN',
|
---|
44 | }}
|
---|
45 | />
|
---|
46 | </Toolbar>
|
---|
47 |
|
---|
48 | <HeaderShadow />
|
---|
49 | </AppBar>
|
---|
50 | );
|
---|
51 | }
|
---|
52 |
|
---|
53 | export default memo(NavHorizontal);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.