source: src/layouts/dashboard/nav-horizontal.tsx@ 87c9f1e

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 
1import { memo } from 'react';
2// @mui
3import { useTheme } from '@mui/material/styles';
4import AppBar from '@mui/material/AppBar';
5import Toolbar from '@mui/material/Toolbar';
6// theme
7import { bgBlur } from 'src/theme/css';
8// auth
9import { useAuthContext } from 'src/auth/hooks';
10// components
11import { NavSectionHorizontal } from 'src/components/nav-section';
12//
13import { HEADER } from '../config-layout';
14import { useNavData } from './config-navigation';
15import { HeaderShadow } from '../_common';
16
17// ----------------------------------------------------------------------
18
19function 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
53export default memo(NavHorizontal);
Note: See TracBrowser for help on using the repository browser.