updating homepage with new categories WIP

This commit is contained in:
Samantha Kellow 2023-11-23 16:13:04 +00:00
parent ad2f16fdbb
commit 13132c883c

View File

@ -1,8 +1,7 @@
import { Button } from '@/components/ui/button';
import { Carousel } from 'components/carousel'; import { Carousel } from 'components/carousel';
import Grid from 'components/grid';
import Footer from 'components/layout/footer'; import Footer from 'components/layout/footer';
import ProductGridItems from 'components/layout/product-grid-items'; import Link from 'next/link';
import { getLiveProducts } from 'lib/utils';
import { Suspense } from 'react'; import { Suspense } from 'react';
export const runtime = 'edge'; export const runtime = 'edge';
@ -11,21 +10,25 @@ export const metadata = {
description: 'scape²: art for the wall & wardrobe.', description: 'scape²: art for the wall & wardrobe.',
openGraph: { openGraph: {
type: 'website' type: 'website'
} },
}; };
export default async function HomePage() { export default async function HomePage() {
const liveProducts = await getLiveProducts({});
return ( return (
<> <>
<Suspense> <Suspense>
<Carousel /> <Carousel />
{liveProducts.length > 0 ? ( <div className='container grid justify-around my-4 grid-cols-1 md:grid-cols-2 items-center justify-items-center'>
<Grid className="grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 m-6"> <Link className='h-full w-full md:w-10/12 flex items-center justify-center justify-items-center' href="/wall">
<ProductGridItems products={liveProducts} /> <Button className='py-3 w-full m-3' variant={'dark'}>
</Grid> <h2>Art for the Wall</h2>
) : null} {/* <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> <Suspense>
<Footer /> <Footer />
</Suspense> </Suspense>