Skip to content

Commit 4839c21

Browse files
committed
fix(web): handle optional params in not-found page
1 parent b740527 commit 4839c21

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/src/app/[locale]/not-found.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import type { Locale } from "next-intl";
22
import { setRequestLocale } from "next-intl/server";
33

44
interface NotFoundPageProps {
5-
params: Promise<{ locale: string }>;
5+
params?: Promise<{ locale: string }>;
66
}
77

88
export default async function NotFoundPage({ params }: NotFoundPageProps) {
9-
const { locale } = await params;
9+
const locale = (await params)?.locale || "en";
1010
setRequestLocale(locale as Locale);
1111

1212
return (

0 commit comments

Comments
 (0)