import React from 'react' import getConfig from 'next/config' const {publicRuntimeConfig} = getConfig() const ErrorPage = ({error}) => { const env = publicRuntimeConfig.SOS_ENV if (!error) return ( <>

Not Found

We couldn't find the item you're looking for. Sorry!

) return ( <>

{error.name}

{error.message}

) } ErrorPage.getInitialProps = ({ctx: {err, req, res}}) => { if(!err) return {error: null} if(res) err.status = res.statusCode return { error: err } } export default ErrorPage