Skip to content

Instantly share code, notes, and snippets.

@silveur
Created July 7, 2020 03:41
Show Gist options
  • Save silveur/860f5fca0d22a8b8560fd5936cf8f4c0 to your computer and use it in GitHub Desktop.
Save silveur/860f5fca0d22a8b8560fd5936cf8f4c0 to your computer and use it in GitHub Desktop.
const Navbar = (props) => {
const isMobile = useIsMobile();
if(isMobile) return <Mobile />
else return <DesktopNav />
}
const DesktopNav = (props) => {
return <navbar className="desktop" />
}
const MobileNav = (props) => {
return <navbar className="mobile" />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment