Created a simple 404.js page
import React from 'react'
import Error from 'next/error'
export default function Page404() {
return <Error statusCode={404} />
}
In [[...page]].tsx:
export async function getStaticPaths() { ... }
export async function getStaticProps({ ... } : StaticProps) {
...
if (!page) {
return {
notFound: true,
}
}
...
}
If I enter some dummy URL, error page is shown, but http status is 200. How can I change it to 404?