import { NextPage } from 'next' ; import ErrorPage from '@weco/common/views/components/ErrorPage/ErrorPage' ; type Props = { statusCode ? : number ; } ; const Page = ( { statusCode } ) => { return < ErrorPage statusCode = { statusCode || 404 } />; } ; Page . getInitialProps = ( { query , res , err } ) => { delete query . memoizedPrismic ; const statusCode = res ? res . statusCode : err ? err . statusCode : 404 ; return { statusCode , skipServerData : true } ; } ; export default Page ;