mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
updating homepage with new categories WIP
This commit is contained in:
parent
ad2f16fdbb
commit
13132c883c
25
app/page.tsx
25
app/page.tsx
@ -1,8 +1,7 @@
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Carousel } from 'components/carousel';
|
||||
import Grid from 'components/grid';
|
||||
import Footer from 'components/layout/footer';
|
||||
import ProductGridItems from 'components/layout/product-grid-items';
|
||||
import { getLiveProducts } from 'lib/utils';
|
||||
import Link from 'next/link';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
export const runtime = 'edge';
|
||||
@ -11,21 +10,25 @@ export const metadata = {
|
||||
description: 'scape²: art for the wall & wardrobe.',
|
||||
openGraph: {
|
||||
type: 'website'
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default async function HomePage() {
|
||||
const liveProducts = await getLiveProducts({});
|
||||
|
||||
return (
|
||||
<>
|
||||
<Suspense>
|
||||
<Carousel />
|
||||
{liveProducts.length > 0 ? (
|
||||
<Grid className="grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 m-6">
|
||||
<ProductGridItems products={liveProducts} />
|
||||
</Grid>
|
||||
) : null}
|
||||
<div className='container grid justify-around my-4 grid-cols-1 md:grid-cols-2 items-center justify-items-center'>
|
||||
<Link className='h-full w-full md:w-10/12 flex items-center justify-center justify-items-center' href="/wall">
|
||||
<Button className='py-3 w-full m-3' variant={'dark'}>
|
||||
<h2>Art for the Wall</h2>
|
||||
{/* <Image src="" alt='' /> */}
|
||||
</Button>
|
||||
</Link>
|
||||
<Link className='h-full w-full md:w-10/12 flex items-center justify-center' href="/wardrobe">
|
||||
<Button className='py-3 w-full m-3' variant={'dark'}>Art for the Wardrobe</Button>
|
||||
</Link>
|
||||
</div>
|
||||
<Suspense>
|
||||
<Footer />
|
||||
</Suspense>
|
||||
|
Loading…
x
Reference in New Issue
Block a user