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 { getTranslations } from 'next-intl/server'; import Image from 'next/image'; import Link from 'next/link'; import { Suspense } from 'react'; import Bg1 from '../assets/images/slide-bg-01.webp'; import Bg2 from '../assets/images/slide-bg-02.webp'; 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'); const t = await getTranslations('HomePage'); return ( <>
{t('helpIA')}
{categories.map((category, index) => (
{category.name} {t('viewAll')}
{[...Array(3)].map((_, i) => ( ))}
} > {index === 1 && ( <>
{t('topProducts')}
)}
))} ); } async function LatestPosts() { const posts = await wordpress.get('posts?_embed'); const t = await getTranslations('HomePage'); return (
{t('latestPosts')}
{posts.map((post: any) => (
{post.title.rendered}

{post.title.rendered}

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