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,7 @@
export default function Footer() {
return (
<footer style={{ padding: "24px", textAlign: "center", color: "#666" }}>
<small>Sample footer for Next.js clone</small>
</footer>
);
}

View File

@@ -0,0 +1,13 @@
export default function Header() {
return (
<header style={{ padding: "20px 24px", background: "#ffffff", borderBottom: "1px solid #e2e2e2" }}>
<div style={{ maxWidth: 1100, margin: "0 auto", display: "flex", alignItems: "center", gap: 16 }}>
<div style={{ fontWeight: 700 }}>Brand</div>
<nav style={{ display: "flex", gap: 12, fontSize: 14 }}>
<a href="/" style={{ textDecoration: "none", color: "inherit" }}>Home</a>
<a href="/search" style={{ textDecoration: "none", color: "inherit" }}>Search</a>
</nav>
</div>
</header>
);
}

View File

@@ -0,0 +1,27 @@
import { Product } from "@/lib/api";
export default function ProductCard({ product }: { product: Product }) {
return (
<article
style={{
border: "1px solid #e1e1e1",
background: "#fff",
borderRadius: 12,
padding: 12,
display: "grid",
gap: 8
}}
>
<div
style={{
height: 160,
borderRadius: 8,
background: `url(${product.image_url}) center/cover no-repeat`
}}
/>
<h3 style={{ margin: 0, fontSize: 14 }}>{product.title}</h3>
<div style={{ fontWeight: 600 }}>${(product.price_cents / 100).toFixed(2)}</div>
<a href={`/listing/${product.id}/${encodeURIComponent(product.title)}`}>View</a>
</article>
);
}