import PreviewBar from './PreviewBar' import GlobalHeader from './GlobalHeader' import GlobalFooter from './GlobalFooter' import { useRouter } from 'next/router' import Head from 'next/head' import dynamic from 'next/dynamic' import tw from "twin.macro" const MainElem = tw.main`p-8`; import AnimationRevealPage from "helpers/AnimationRevealPage" import Error from 'next/error' function Layout(props) { const { page, sitemapNode, dynamicPageItem, notFound } = props // If the page is not yet generated, this will be displayed // initially until getStaticProps() finishes running const router = useRouter() if (router.isFallback) { return