import Head from 'next/head'; import { ReactNode, useEffect, useState } from 'react'; import AppBar from '@material-ui/core/AppBar'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import IconButton from '@material-ui/core/IconButton'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import ListItemIcon from '@material-ui/core/ListItemIcon'; import ListItemText from '@material-ui/core/ListItemText'; import SwipeableDrawer from '@material-ui/core/SwipeableDrawer'; import Toolbar from '@material-ui/core/Toolbar'; import AccountCircleRoundedIcon from '@material-ui/icons/AccountCircleRounded'; import HomeRoundedIcon from '@material-ui/icons/HomeRounded'; import MenuRoundedIcon from '@material-ui/icons/MenuRounded'; import SettingsRoundedIcon from '@material-ui/icons/SettingsRounded'; import { LoginRoundedIcon, QRCodeRoundedIcon } from '../../components/icons'; export type pages = 'home' | 'account' | 'settings'; export function MobileWrapper(props: { children?: ReactNode; page: pages; nobar?: boolean; }) { var [drawerOpen, setDrawerOpen] = useState(false); var [iOS, setIOS] = useState(false); useEffect(() => { setIOS(process.browser && /iPad|iPhone|iPod/.test(navigator.userAgent)); }, []); return