Created
October 8, 2021 16:50
-
-
Save biancadragomir/3996e34a459b08378c7c42aae84ffc3d to your computer and use it in GitHub Desktop.
Layout component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
export const Layout = () => { | |
// will be true on all devices smaller than a desktop | |
const isDesktopOrUp = useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')); | |
return <Grid container direction="column"> | |
<Header /> | |
<Content /> | |
// the bottom navigation will be visible on tablets and mobile phones | |
{!isDesktopOrUp && <BottomNavigationMenu pathname={pathname} />} | |
</Grid> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment