mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
Tweak
This commit is contained in:
parent
bcec144e68
commit
eecef825c5
@ -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 (
|
||||
<html lang={locale} className={inter.variable}>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
<body className="flex min-h-screen flex-col">
|
||||
<NextIntlClientProvider locale={locale} messages={messages}>
|
||||
<Header />
|
||||
<main className="flex-1">
|
||||
{children}
|
||||
</main>
|
||||
<main className="flex-1">{children}</main>
|
||||
<Footer />
|
||||
</NextIntlClientProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user