feat: add checkout page

This commit is contained in:
Victor Gerbrands
2023-05-12 14:13:04 +02:00
parent d9e00ff560
commit b8f154cdf5
3 changed files with 19 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import Prose from 'components/prose';
import { CHECKOUT_PAGE_PROPS } from 'lib/constants';
import { notFound } from 'next/navigation';
export const runtime = 'edge';
@@ -12,13 +13,15 @@ export async function generateMetadata({
}: {
params: { page: string };
}): Promise<Metadata> {
const page: any = null;
let page;
params.page === 'checkout' && (page = CHECKOUT_PAGE_PROPS);
if (!page) return notFound();
return {
title: page.seo?.title || page.title,
description: page.seo?.description || page.bodySummary,
title: page.title,
description: '',
openGraph: {
images: [
{
@@ -35,7 +38,9 @@ export async function generateMetadata({
}
export default async function Page({ params }: { params: { page: string } }) {
const page: any = null;
let page;
params.page === 'checkout' && (page = CHECKOUT_PAGE_PROPS);
if (!page) return notFound();