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