import { mockProducts } from 'app/data'; import Error from 'app/error'; import Grid from 'components/grid'; import { Search } from 'components/layout/search'; import { PriceBox } from 'components/price-box'; import ProductGridItems from 'components/product/product-grid-items'; import { getCollectionProducts } from 'lib/shopify'; import Image from 'next/image'; //Todo: change to proper metadata export const metadata = { description: 'High-performance ecommerce store built with Next.js, Vercel, and Shopify.', openGraph: { type: 'website' } }; export default async function HomePage() { const products = await getCollectionProducts({ collection: 'landing' }); //Todo: change to proper error handling if (!products[0]) return ; return ( <>
{products[0].featuredImage.altText

{products[0].title}

Read more
{mockProducts.slice(0, 4).map(({ featuredImage, id, title, handle }) => ( ))} {mockProducts.slice(0, 3).map(({ featuredImage, id, title, handle }) => ( ))} {mockProducts.slice(0, 2).map(({ featuredImage, id, title, handle }) => ( ))} ); }