feat: add why choose us section

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-06-05 11:33:44 +07:00
parent d1546a36ef
commit a356148ed3
11 changed files with 161 additions and 21 deletions

View File

@@ -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 />