add fix to finish homepage

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe 2024-06-29 09:14:10 +07:00
parent 373af98ba2
commit d3522a9246
No known key found for this signature in database
GPG Key ID: CFD53CE570D42DF5
3 changed files with 11 additions and 5 deletions

View File

@ -8,7 +8,7 @@ import { Metadata } from 'next';
import { Suspense } from 'react'; import { Suspense } from 'react';
export const runtime = 'edge'; export const runtime = 'edge';
const { SITE_NAME } = process.env; const { SITE_NAME, STORE_PREFIX } = process.env;
export async function generateMetadata(): Promise<Metadata> { export async function generateMetadata(): Promise<Metadata> {
return { 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() { export default async function HomePage() {
return ( return (
<> <>
@ -35,7 +40,7 @@ export default async function HomePage() {
<FAQ handle="home-page-faqs" /> <FAQ handle="home-page-faqs" />
</Suspense> </Suspense>
<Suspense> <Suspense>
<Manufacturers /> <Manufacturers variant={manufactureVariant[STORE_PREFIX!]} />
</Suspense> </Suspense>
</div> </div>
<Suspense> <Suspense>

View File

@ -37,7 +37,7 @@ const About = async () => {
<div className="flex h-full flex-col justify-between pb-2"> <div className="flex h-full flex-col justify-between pb-2">
<div className="mb-3 flex flex-col gap-3"> <div className="mb-3 flex flex-col gap-3">
<Tag text="About Us" /> <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} {introduction ? <RichTextDisplay contentBlocks={introduction.children} /> : null}
<DisplayTabs items={features} /> <DisplayTabs items={features} />

View File

@ -27,8 +27,9 @@ const WhyChoose = async () => {
<ImageDisplay <ImageDisplay
fileId={reason.file as string} fileId={reason.file as string}
title={(reason.title || reason.name) as string} title={(reason.title || reason.name) as string}
className="h-[60px] w-[60px]" className="h-[50px] w-[50px]"
sizes="60px" sizes="50px"
unoptimized
/> />
</Suspense> </Suspense>
<div className="mx-3 h-[100px] min-w-0.5 bg-gray-200" /> <div className="mx-3 h-[100px] min-w-0.5 bg-gray-200" />