Skip to content

Commit

Permalink
feat(v2): not found
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz committed Feb 18, 2024
1 parent 7de5659 commit ab8a185
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions examples/app/app/[locale]/[...notFound]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { notFound } from 'next/navigation';

export default function NotFound() {
notFound();
}
5 changes: 4 additions & 1 deletion examples/app/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { I18nProvider, generateI18nStaticParams } from '@/locales';
import React from 'react';

export const generateStaticParams = generateI18nStaticParams();
export const dynamicParams = false;
export function generateStaticParams() {
return generateI18nStaticParams();
}

export default function RootLayout({
children,
Expand Down
10 changes: 10 additions & 0 deletions examples/app/app/[locale]/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';

export default function NotFound() {
return (
<div>
<h2>Custom Not Found page</h2>
<p>Could not find requested resource</p>
</div>
);
}

0 comments on commit ab8a185

Please sign in to comment.