Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
NextJS custom 404 page not showing up

I have a custom pages/404.ts with the following content:

export default function NotFound() {
  return <h1>404 - Page Not Found</h1>
}

And I have another page that shows 404 when some organization is null:

import Error from 'next/error'

const Slug: NextPage<SlugProps> = ({ organization }) => {
  if (!organization) {
    return <Error statusCode={404} />
  }

  return <h1>{organization.name}</h1>
}

I want to NextJS show my custom 404 page, instead of, it showing the default

What I need to do to show my 404 page?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You are reusing the built-in error page.

If you want to display your custom 404 in the dynamic route, just import your NotFound component and return that instead.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!