2023-08-20 23:22:29 +09:00

42 lines
958 B
TypeScript

import Footer from 'components/layout/footer';
import { SupportedLocale } from 'components/layout/navbar/language-control';
import Navbar from 'components/layout/navbar';
import { getCart } from 'lib/shopify';
import { cookies } from 'next/headers';
import { Suspense } from 'react';
import CompanyDetail from './company-detail';
export const runtime = 'edge';
const { SITE_NAME } = process.env;
export const metadata = {
title: SITE_NAME,
description: SITE_NAME,
openGraph: {
type: 'website'
}
};
export default async function Page({ params }: { params: { locale?: SupportedLocale } }) {
const cartId = cookies().get('cartId')?.value;
let cart;
if (cartId) {
cart = await getCart(cartId);
}
return (
<div>
<Navbar cart={cart} locale={params?.locale} compact />
<div className="pt-12">
<CompanyDetail />
</div>
<Suspense>
<Footer cart={cart} />
</Suspense>
</div>
);
}