mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
wip: Working on footer
This commit is contained in:
@@ -12,7 +12,7 @@ export const revalidate = 43200; // 12 hours in seconds
|
||||
export async function generateMetadata({
|
||||
params
|
||||
}: {
|
||||
params: { page: string; locale: SupportedLocale };
|
||||
params: { page: string; locale?: SupportedLocale };
|
||||
}): Promise<Metadata> {
|
||||
const page = await getPage({ handle: params.page, language: params?.locale?.toUpperCase() });
|
||||
|
||||
@@ -32,7 +32,7 @@ export async function generateMetadata({
|
||||
export default async function Page({
|
||||
params
|
||||
}: {
|
||||
params: { page: string; locale: SupportedLocale };
|
||||
params: { page: string; locale?: SupportedLocale };
|
||||
}) {
|
||||
const page = await getPage({ handle: params.page, language: params?.locale?.toUpperCase() });
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import Navbar from 'components/layout/navbar';
|
||||
import { Locale } from 'i18n-config';
|
||||
import { Noto_Sans_JP } from 'next/font/google';
|
||||
import { Noto_Serif_JP } from 'next/font/google';
|
||||
import localFont from 'next/font/local';
|
||||
import { ReactNode, Suspense } from 'react';
|
||||
|
||||
import { SupportedLocale } from 'components/layout/navbar/language-control';
|
||||
import { NextIntlClientProvider } from 'next-intl';
|
||||
import { notFound } from 'next/navigation';
|
||||
import './globals.css';
|
||||
@@ -56,19 +56,13 @@ const alpina = localFont({
|
||||
variable: '--font-alpina'
|
||||
});
|
||||
|
||||
const noto = Noto_Sans_JP({
|
||||
const noto = Noto_Serif_JP({
|
||||
subsets: ['latin'],
|
||||
display: 'swap',
|
||||
weight: ['300', '600'],
|
||||
variable: '--font-noto'
|
||||
});
|
||||
|
||||
const mincho = localFont({
|
||||
src: '../fonts/A-OTF-A1MinchoStd-Bold.otf',
|
||||
display: 'swap',
|
||||
variable: '--font-mincho'
|
||||
});
|
||||
|
||||
export function generateStaticParams() {
|
||||
return [{ locale: 'en' }, { locale: 'ja' }];
|
||||
}
|
||||
@@ -78,7 +72,7 @@ export default async function RootLayout({
|
||||
params
|
||||
}: {
|
||||
children: ReactNode;
|
||||
params: { locale: Locale };
|
||||
params: { locale?: SupportedLocale };
|
||||
}) {
|
||||
let messages;
|
||||
try {
|
||||
|
@@ -25,7 +25,7 @@ export const metadata = {
|
||||
export default async function HomePage({
|
||||
params: { locale }
|
||||
}: {
|
||||
params: { locale: SupportedLocale };
|
||||
params: { locale?: SupportedLocale };
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import type { Metadata } from 'next';
|
||||
|
||||
import LogoNamemark from 'components/icons/namemark';
|
||||
import { SupportedLocale } from 'components/layout/navbar/language-control';
|
||||
import Prose from 'components/prose';
|
||||
import { getPage } from 'lib/shopify';
|
||||
@@ -13,9 +14,9 @@ export const revalidate = 43200; // 12 hours in seconds
|
||||
export async function generateMetadata({
|
||||
params
|
||||
}: {
|
||||
params: { page: string; locale: SupportedLocale };
|
||||
params: { locale?: SupportedLocale };
|
||||
}): Promise<Metadata> {
|
||||
const page = await getPage({ handle: params.page, language: params?.locale?.toUpperCase() });
|
||||
const page = await getPage({ handle: 'shop-list', language: params?.locale?.toUpperCase() });
|
||||
|
||||
if (!page) return notFound();
|
||||
|
||||
@@ -30,17 +31,16 @@ export async function generateMetadata({
|
||||
};
|
||||
}
|
||||
|
||||
export default async function Page({
|
||||
params
|
||||
}: {
|
||||
params: { page: string; locale: SupportedLocale };
|
||||
}) {
|
||||
const page = await getPage({ handle: params.page, language: params?.locale?.toUpperCase() });
|
||||
export default async function Page({ params }: { params: { locale?: SupportedLocale } }) {
|
||||
const page = await getPage({ handle: 'shop-list', language: params?.locale?.toUpperCase() });
|
||||
|
||||
if (!page) return notFound();
|
||||
|
||||
return (
|
||||
<div className="font-multilingual min-h-screen px-4 text-white">
|
||||
<div className="pb-12">
|
||||
<LogoNamemark className="w-[260px] fill-current md:w-[320px]" />
|
||||
</div>
|
||||
<ShopsTitle />
|
||||
<h2 className="mb-8 text-3xl font-medium">{page.title}</h2>
|
||||
<Prose className="mb-8" html={page.body as string} />
|
Reference in New Issue
Block a user