| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- import AppBar from '@mui/material/AppBar';
- import Box from '@mui/material/Box';
- import Typography from '@mui/material/Typography';
- import Image from 'next/image';
- const pages = ['Home', 'Menu', 'About', 'Store', 'Contact'];
-
- const Navbar = () => {
- // const { data: session } = useSession();
- // const [anchorElNav, setAnchorElNav] = useState(null);
- // const [anchorElUser, setAnchorElUser] = useState(null);
-
- // const handleOpenNavMenu = (event) => {
- // setAnchorElNav(event.currentTarget);
- // };
- // const handleOpenUserMenu = (event) => {
- // setAnchorElUser(event.currentTarget);
- // };
-
- // const handleCloseNavMenu = () => {
- // setAnchorElNav(null);
- // };
-
- // const handleCloseUserMenu = () => {
- // setAnchorElUser(null);
- // };
-
- // function logoutHandler() {
- // signOut();
- // }
-
- return (
- <AppBar
- position="absolute"
- sx={{
- zIndex: 100,
- top: 20,
- width: '100%',
- backgroundColor: 'transparent',
- boxShadow: 'none',
- height: 40,
- }}
- >
- <Box sx={{ display: 'flex', width: '100%' }}>
- <Box
- sx={{
- flexGrow: 1,
- maxWidth: '50%',
- height: 30,
- display: { xs: 'none', md: 'flex' },
- px: 10,
- }}
- >
- {pages.map((page) => (
- <Typography
- key={page}
- textAlign="center"
- sx={{ mx: 'auto', fontSize: 20, fontWeight: 500 }}
- >
- {page}
- </Typography>
- ))}
- </Box>
- <Box
- sx={{
- flexGrow: 1,
- maxWidth: '50%',
- height: 30,
- display: { xs: 'none', md: 'flex' },
- justifyContent: 'right',
- pt: 0.5,
- mr: 4,
- }}
- >
- <Box
- sx={{
- mx: 2,
- }}
- >
- <Image
- src="/images/profile.svg"
- alt="profile"
- width={24}
- height={24}
- />
- </Box>
- <Box
- sx={{
- mr: 6,
- ml: 2,
- }}
- >
- <Image src="/images/cart.svg" alt="cart" width={24} height={24} />
- </Box>
- </Box>
- </Box>
- </AppBar>
- );
- };
- export default Navbar;
|