mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
add fix to finish homepage
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user