mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
feat: add why choose us section
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
12
app/page.tsx
12
app/page.tsx
@@ -1,18 +1,17 @@
|
||||
import Hero from 'components/hero';
|
||||
import About from 'components/home-page/about';
|
||||
import WhyChoose from 'components/home-page/why-choose';
|
||||
import Footer from 'components/layout/footer';
|
||||
import { getPage } from 'lib/shopify';
|
||||
import { Metadata } from 'next';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
export const runtime = 'edge';
|
||||
const { SITE_NAME } = process.env;
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const page = await getPage('home-page');
|
||||
|
||||
return {
|
||||
title: page?.seo?.title || page?.title,
|
||||
description: page?.seo?.description || page?.bodySummary,
|
||||
title: SITE_NAME,
|
||||
description: `${SITE_NAME} is your ultimate destination for all your drivetrain replacement needs.`,
|
||||
openGraph: {
|
||||
type: 'website'
|
||||
}
|
||||
@@ -25,8 +24,9 @@ export default async function HomePage() {
|
||||
<Suspense>
|
||||
<Hero />
|
||||
</Suspense>
|
||||
<div className="mx-auto flex min-h-96 max-w-7xl flex-col space-y-16 px-6 py-12 lg:px-8">
|
||||
<div className="mx-auto flex min-h-96 max-w-7xl flex-col space-y-14 px-6 py-16 sm:space-y-28 lg:px-8">
|
||||
<About />
|
||||
<WhyChoose />
|
||||
</div>
|
||||
<Suspense>
|
||||
<Footer />
|
||||
|
Reference in New Issue
Block a user