From d8f25925df2055745fbfffb7141d92dc10c3e172 Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Mon, 10 Jun 2024 11:32:32 +0200 Subject: [PATCH] fix: error page for language switcher --- .../@languageSwitcher/[...paths]/error.tsx | 6 +++ .../@languageSwitcher/error.tsx | 6 +++ app/[lang]/(live-current)/layout.tsx | 8 ++-- components/Current/Header/TopMenu/index.tsx | 4 +- .../Loyalty/Sidebar/JoinLoyalty/index.tsx | 11 +++-- components/Loyalty/Sidebar/index.tsx | 8 +++- server/routers/contentstack/base/query.ts | 47 ++++++++++--------- types/components/current/header/mainMenu.ts | 2 +- types/components/current/header/topMenu.ts | 2 +- 9 files changed, 57 insertions(+), 37 deletions(-) create mode 100644 app/[lang]/(live)/@languageSwitcher/[...paths]/error.tsx create mode 100644 app/[lang]/(live-current)/@languageSwitcher/error.tsx diff --git a/app/[lang]/(live)/@languageSwitcher/[...paths]/error.tsx b/app/[lang]/(live)/@languageSwitcher/[...paths]/error.tsx new file mode 100644 index 000000000..1c8b26d65 --- /dev/null +++ b/app/[lang]/(live)/@languageSwitcher/[...paths]/error.tsx @@ -0,0 +1,6 @@ +"use client" + +export default function Error({ error }: any) { + // Don't return any content if error + return null +} diff --git a/app/[lang]/(live-current)/@languageSwitcher/error.tsx b/app/[lang]/(live-current)/@languageSwitcher/error.tsx new file mode 100644 index 000000000..64bc23aa3 --- /dev/null +++ b/app/[lang]/(live-current)/@languageSwitcher/error.tsx @@ -0,0 +1,6 @@ +"use client" + +export default function Error() { + // Don't return any content if error + return null +} diff --git a/app/[lang]/(live-current)/layout.tsx b/app/[lang]/(live-current)/layout.tsx index 35fd0bc8c..ce6ac8a4d 100644 --- a/app/[lang]/(live-current)/layout.tsx +++ b/app/[lang]/(live-current)/layout.tsx @@ -80,11 +80,11 @@ export default async function RootLayout({ - + -
- {children} -