blob: 5b22e27b052e9cf96bd721e0e21da2b8b64e2d72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import React from 'react';
import { Link } from 'react-router-dom';
import { AppBar, Toolbar, Typography } from '@mui/material';
import useMediaQuery from '@mui/material/useMediaQuery';
import Desktop from './Desktop';
import Mobile from './Mobile';
function NavBar() {
const isMobile = useMediaQuery('(max-width: 768px)');
return (
<AppBar>
<Toolbar>
<Typography
variant="h5"
component={Link}
to="/"
color="inherit"
sx={{ textDecoration: 'none' }}
>
Madison & Michael
</Typography>
{isMobile ? <Mobile /> : <Desktop />}
</Toolbar>
</AppBar>
);
}
export default NavBar;
|