From f232c2549493f7a62bc4876f1c8864886c356b63 Mon Sep 17 00:00:00 2001 From: sarthak-kumar-shailendra Date: Fri, 6 Oct 2023 23:18:02 +0530 Subject: [PATCH] added custom 404 page --- .../(chapter)/[[...locale]]/page.tsx | 13 ++++-- .../[verseNumber]/[[...locale]]/page.tsx | 13 ++++-- .../verse-of-the-day/[[...locale]]/page.tsx | 8 +++- src/components/NotFound/index.tsx | 43 ++++++++++++++++++- src/shared/translate/locales/hi.json | 6 ++- 5 files changed, 73 insertions(+), 10 deletions(-) diff --git a/src/app/chapter/[chapterNumber]/(chapter)/[[...locale]]/page.tsx b/src/app/chapter/[chapterNumber]/(chapter)/[[...locale]]/page.tsx index b7031ce..e545133 100644 --- a/src/app/chapter/[chapterNumber]/(chapter)/[[...locale]]/page.tsx +++ b/src/app/chapter/[chapterNumber]/(chapter)/[[...locale]]/page.tsx @@ -89,12 +89,19 @@ export default async function Chapter({ params }: Props) { languageSettings.translationAuthor.id, ); + const translations = await getTranslations(locale); + if (!chapterData) { - return ; + return ( + + ); } - const translations = await getTranslations(locale); - return ( <>