import type { Metadata } from 'next'; import Footer from 'components/layout/footer'; import Navbar from 'components/layout/navbar'; import { SupportedLocale } from 'components/layout/navbar/language-control'; import Prose from 'components/prose'; import { getCart, getPage } from 'lib/shopify'; import { cookies } from 'next/headers'; import { notFound } from 'next/navigation'; import { Suspense } from 'react'; import ShopsTitle from './ShopsTitle'; export const runtime = 'edge'; export const revalidate = 43200; // 12 hours in seconds export async function generateMetadata({ params }: { params: { locale?: SupportedLocale }; }): Promise { const page = await getPage({ handle: 'shop-list', language: params?.locale?.toUpperCase() }); if (!page) return notFound(); return { title: page.seo?.title || page.title, description: page.seo?.description || page.bodySummary, openGraph: { publishedTime: page.createdAt, modifiedTime: page.updatedAt, type: 'article' } }; } export default async function Page({ params }: { params: { locale?: SupportedLocale } }) { const cartId = cookies().get('cartId')?.value; let cart; if (cartId) { cart = await getCart(cartId); } const page = await getPage({ handle: 'shop-list', language: params?.locale?.toUpperCase() }); if (!page) return notFound(); return (

{page.title}

); }