From d2bc8bd162b492ac325308cfa4827e04fda03fe1 Mon Sep 17 00:00:00 2001 From: Max Mogilski Date: Tue, 14 Nov 2023 11:43:23 +0100 Subject: [PATCH 1/2] fix: data fetch tweak --- src/app/[lang]/layout.tsx | 8 ++++---- src/components/Footer/Footer.tsx | 14 ++++++++++---- src/lib/client.ts | 10 +++++----- src/lib/queries/components.ts | 6 +++--- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/app/[lang]/layout.tsx b/src/app/[lang]/layout.tsx index 2827100..a7bfad9 100644 --- a/src/app/[lang]/layout.tsx +++ b/src/app/[lang]/layout.tsx @@ -1,3 +1,5 @@ +import { notFound } from "next/navigation" +import { unstable_setRequestLocale } from "next-intl/server" import { Footer } from "@/components/Footer/Footer" import { Navigation } from "@/components/Navigation/Navigation" import { env } from "@/env.mjs" @@ -5,8 +7,6 @@ import { i18n, type Locale } from "@/i18n/i18n" import { setTranslations } from "@/i18n/setTranslations" import { getNavigation } from "@/lib/client" import "@/styles/tailwind.css" -import { unstable_setRequestLocale } from "next-intl/server" -import { notFound } from "next/navigation" import { GoogleAnalytics } from "../GoogleAnalytics" import Providers from "../Providers" @@ -41,7 +41,7 @@ export default async function Layout({ children, params }: { children: React.Rea if (!isValidLocale) notFound() unstable_setRequestLocale(locale) const translations = await setTranslations(locale) - const { navigation, footer, logo } = await getNavigation(locale) + const { navigation, footer } = await getNavigation(locale) return ( @@ -55,7 +55,7 @@ export default async function Layout({ children, params }: { children: React.Rea
{children}
-