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