mirror of https://github.com/MaxLeiter/Drift
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
360 B
TypeScript
18 lines
360 B
TypeScript
import ErrorComponent from '@components/error'
|
|
|
|
function Error({ statusCode }: {
|
|
statusCode: number
|
|
}) {
|
|
return <ErrorComponent status={statusCode} />
|
|
}
|
|
|
|
Error.getInitialProps = ({ res, err }: {
|
|
res: any
|
|
err: any
|
|
}) => {
|
|
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
|
return { statusCode }
|
|
}
|
|
|
|
export default Error
|