2022-04-09 20:48:19 -04:00
|
|
|
import ErrorComponent from "@components/error"
|
2022-04-06 19:31:41 -04:00
|
|
|
|
2022-04-09 20:48:19 -04:00
|
|
|
function Error({ statusCode }: { statusCode: number }) {
|
|
|
|
return <ErrorComponent status={statusCode} />
|
2022-04-06 19:31:41 -04:00
|
|
|
}
|
|
|
|
|
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 }
|
2022-04-06 19:31:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Error
|