chore: add nextjs template

This commit is contained in:
Pranav Putta
2026-02-19 12:10:51 -08:00
parent 0283cf7ee7
commit a7675e42cd
18 changed files with 443 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import ProductCard from "@/components/ProductCard";
import { fetchProducts } from "@/lib/api";
export default async function Page() {
const products = await fetchProducts();
return (
<main>
<Header />
<section style={{ maxWidth: 1100, margin: "32px auto", padding: "0 24px" }}>
<h1 style={{ marginBottom: 16 }}>Featured products</h1>
<div style={{ display: "grid", gap: 16, gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))" }}>
{products.slice(0, 8).map((product) => (
<ProductCard key={product.id} product={product} />
))}
</div>
</section>
<Footer />
</main>
);
}