export const metadata = { description: 'High-performance ecommerce store built with Next.js, Vercel, and Shopify.', openGraph: { type: 'website' } }; import { Carousel } from 'components/carousel'; import { ThreeItemGrid } from 'components/grid/three-items'; import ProductSuspense from 'components/product/product-suspense'; import { Category } from 'lib/woocomerce/models/base'; import { Product } from 'lib/woocomerce/models/product'; import { woocommerce } from 'lib/woocomerce/woocommerce'; import { wordpress } from 'lib/wordpress/wordpress'; import Link from 'next/link'; import { Suspense } from 'react'; async function Products({ category }: { category: Category }) { const products: Product[] = await woocommerce.get('products', { category: category.id.toString() }); return ; } async function ProductsByCategory() { const categories: Category[] = await woocommerce.get('products/categories'); return ( <> {categories.map((category, index) => (
{category.name}
{category.description}
{[...Array(3)].map((_, i) => ( ))}
} > {index === 1 && (
Top products
)} ))} ); } async function LatestPosts() { const posts = await wordpress.get('posts?_embed'); return (
Latest posts
{posts.map((post: any) => (
{post.title.rendered}

{post.title.rendered}

))}
); } export default async function HomePage() { return (
{[...Array(3)].map((_, i) => ( ))}
} > {[...Array(3)].map((_, i) => ( ))} } > ); }