CoastalCommitsPastes/client/pages/_error.tsx

13 lines
340 B
TypeScript
Raw Normal View History

2022-04-09 20:48:19 -04:00
import ErrorComponent from "@components/error"
2022-04-09 20:48:19 -04:00
function Error({ statusCode }: { statusCode: number }) {
return <ErrorComponent status={statusCode} />
}
2022-04-09 20:48:19 -04:00
Error.getInitialProps = ({ res, err }: { res: any; err: any }) => {
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
return { statusCode }
}
export default Error