import { Container } from 'react-basics'; import Head from 'next/head'; import NavBar from 'components/layout/NavBar'; import useRequireLogin from 'hooks/useRequireLogin'; import styles from './AppLayout.module.css'; export default function AppLayout({ title, children }) { const { user } = useRequireLogin(); if (!user) { return null; } return (
{title ? `${title} | umami` : 'umami'}
{children}
); }