mirror of
https://github.com/vercel/commerce.git
synced 2025-05-11 12:17:51 +00:00
add fix to finish homepage
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
parent
373af98ba2
commit
d3522a9246
@ -8,7 +8,7 @@ import { Metadata } from 'next';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
export const runtime = 'edge';
|
||||
const { SITE_NAME } = process.env;
|
||||
const { SITE_NAME, STORE_PREFIX } = process.env;
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
return {
|
||||
@ -20,6 +20,11 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
};
|
||||
}
|
||||
|
||||
const manufactureVariant: Record<string, 'home' | 'engines' | 'transmissions'> = {
|
||||
'reman-transmission': 'transmissions',
|
||||
'car-part-planet': 'home'
|
||||
};
|
||||
|
||||
export default async function HomePage() {
|
||||
return (
|
||||
<>
|
||||
@ -35,7 +40,7 @@ export default async function HomePage() {
|
||||
<FAQ handle="home-page-faqs" />
|
||||
</Suspense>
|
||||
<Suspense>
|
||||
<Manufacturers />
|
||||
<Manufacturers variant={manufactureVariant[STORE_PREFIX!]} />
|
||||
</Suspense>
|
||||
</div>
|
||||
<Suspense>
|
||||
|
@ -37,7 +37,7 @@ const About = async () => {
|
||||
<div className="flex h-full flex-col justify-between pb-2">
|
||||
<div className="mb-3 flex flex-col gap-3">
|
||||
<Tag text="About Us" />
|
||||
<h3 className="text-3xl font-semibold lg:text-4xl">Engine & Transmission Experts</h3>
|
||||
<h3 className="text-3xl font-semibold lg:text-4xl">{aboutUs.title}</h3>
|
||||
{introduction ? <RichTextDisplay contentBlocks={introduction.children} /> : null}
|
||||
|
||||
<DisplayTabs items={features} />
|
||||
|
@ -27,8 +27,9 @@ const WhyChoose = async () => {
|
||||
<ImageDisplay
|
||||
fileId={reason.file as string}
|
||||
title={(reason.title || reason.name) as string}
|
||||
className="h-[60px] w-[60px]"
|
||||
sizes="60px"
|
||||
className="h-[50px] w-[50px]"
|
||||
sizes="50px"
|
||||
unoptimized
|
||||
/>
|
||||
</Suspense>
|
||||
<div className="mx-3 h-[100px] min-w-0.5 bg-gray-200" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user