Not found page not working
Unanswered
Collared Plover posted this in #help-forum
Collared PloverOP
Hey everyone, I got a 404 page at:
This is because I'm using next-intl. But somehow it is not picking up my not-found page.
src/app/[locale]/not-found.js
This is because I'm using next-intl. But somehow it is not picking up my not-found page.
// not-found.js
import Image from "next/image";
import Button from "./components/Button";
export default function NotFound(){
return(
<div className="wrapper text-center">
<Image src={'/404.gif'} width={800} height={600} alt="404 Gif" className="mx-auto" priority />
<h1 className="text-xl font-medium mt-5">Pagina niet gevonden</h1>
<Button href={'/'} type={'primary'} className={'mt-3'}>
Terug naar home
</Button>
</div>
)
}3 Replies
Dwarf Crocodile
Try putting the not-found.js in your /app folder instead of your /app/[locale]
@Dwarf Crocodile Try putting the not-found.js in your /app folder instead of your /app/[locale]
Collared PloverOP
Yes this works, but because I have no layout.js file inside my app folder I need to make a layouts folder too
I mean that's not an issue, I will give it a shot 😉