blob: af95d2bf98d2577405a7a5a3c9ca93d049cd147c (
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
30
|
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';
import { LettersPullUp } from './LettersPullUp';
function NavBar() {
const isMobile = useMediaQuery('(max-width: 768px)');
return (
<AppBar>
<Toolbar>
<Typography
variant="h5"
component={Link}
to="/"
color="inherit"
sx={{ textDecoration: 'none' }}
>
<LettersPullUp text="Madison & Michael" />
</Typography>
{isMobile ? <Mobile /> : <Desktop />}
</Toolbar>
</AppBar>
);
}
export default NavBar;
|