chore: add nextjs template
This commit is contained in:
7
frontend-nextjs/components/Footer.tsx
Normal file
7
frontend-nextjs/components/Footer.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
13
frontend-nextjs/components/Header.tsx
Normal file
13
frontend-nextjs/components/Header.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
27
frontend-nextjs/components/ProductCard.tsx
Normal file
27
frontend-nextjs/components/ProductCard.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user