diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index 10b80c3ce..817770125 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -6,12 +6,12 @@ import { notFound } from 'next/navigation'; import { ReactNode } from 'react'; import './globals.css'; -const SITE_NAME = "KM Storefront" -const SITE_DESCRIPTION = "Webb och digitalbyrå från Göteborg" -const TWITTER_CREATOR = "@kodamera.se" -const TWITTER_SITE = "https://kodamera.se" -const OG_IMAGE_URL = "/og-image.jpg" -const OG_IMAGE_ALT = "Kodamera" +const SITE_NAME = 'KM Storefront'; +const SITE_DESCRIPTION = 'Webb och digitalbyrå från Göteborg'; +const TWITTER_CREATOR = '@kodamera.se'; +const TWITTER_SITE = 'https://kodamera.se'; +const OG_IMAGE_URL = '/og-image.jpg'; +const OG_IMAGE_ALT = 'Kodamera'; export const metadata = { title: { @@ -26,8 +26,8 @@ export const metadata = { width: 1200, height: 630, alt: OG_IMAGE_ALT - }, - ], + } + ] }, robots: { follow: true, @@ -48,40 +48,36 @@ const inter = Inter({ display: 'swap', variable: '--font-inter' }); - + export function generateStaticParams() { - return [{locale: 'sv'}, {locale: 'en'}]; + return [{ locale: 'sv' }, { locale: 'en' }]; } interface LocaleLayoutProps { - children: ReactNode + children: ReactNode; params: { - locale: string - } + locale: string; + }; } - -export default async function LocaleLayout({children, params: {locale}}: LocaleLayoutProps) { + +export default async function LocaleLayout({ children, params: { locale } }: LocaleLayoutProps) { let messages; - + try { messages = (await import(`../../messages/${locale}.json`)).default; } catch (error) { notFound(); } - + return ( - +
-
- {children} -
+
{children}