Skip to content

Commit 156bb32

Browse files
petersdtjulienbrs
authored andcommitted
feat: add mock picture
1 parent 9d817b3 commit 156bb32

5 files changed

Lines changed: 19 additions & 8 deletions

File tree

frontend/bun.lockb

274 KB
Binary file not shown.

frontend/public/250.png

2.11 KB
Loading

frontend/src/app/dashboard/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ const Dashboard = () => {
4040

4141
<main className="max-w-7xl mx-auto px-4 py-8">
4242
<h1 className="text-3xl font-bold mb-8">My Carbon Certificates</h1>
43-
43+
4444
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
4545
{nftsWithLocks.map((nft) => (
4646
<div key={nft.id} className="bg-neutral-700 rounded-lg p-6 hover:bg-neutral-600 transition-colors">
47-
<NFTCard
48-
id={nft.id}
49-
description={nft.description}
47+
<NFTCard
48+
id={nft.id}
49+
image={nft.image}
50+
description={nft.description}
5051
status={nft.status}
5152
lockAmount={nft.lockDetails?.amount}
5253
lockDuration={nft.lockDetails?.duration}

frontend/src/components/NFTCard.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1+
import Image from "next/image";
2+
13
interface NFTCardProps {
24
id: string;
35
description: string;
46
status: string;
57
lockAmount?: number;
68
lockDuration?: string;
79
lockStatus?: string;
10+
image: string;
811
}
912

10-
const NFTCard = ({ id, description, status, lockAmount, lockDuration, lockStatus }: NFTCardProps) => {
13+
const NFTCard = ({ id, description, status, lockAmount, lockDuration, lockStatus, image }: NFTCardProps) => {
1114
return (
1215
<div className="flex flex-col h-full">
1316
<div className="aspect-square bg-neutral-600 rounded-lg mb-4">
1417
{/* NFT Image placeholder */}
18+
<Image
19+
src={image}
20+
alt={`Certificate ${id}`}
21+
className="w-full h-full object-cover"
22+
width={200}
23+
height={400}
24+
/>
1525
</div>
1626
<div className="flex flex-col gap-2">
1727
<h3 className="text-xl font-semibold">Certificate #{id}</h3>

frontend/src/hooks/useMockData.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const useMockData = () => {
66
];
77

88
const getNFTs = () => [
9-
{ id: "1001", lockId: "1", description: "50 tokens locked for 30 days", status: "Active" },
10-
{ id: "1002", lockId: "2", description: "100 tokens locked for 60 days", status: "Archived" },
11-
{ id: "1003", lockId: "3", description: "100 tokens locked for 60 days", status: "Archived" },
9+
{ id: "1001", lockId: "1", description: "50 tokens locked for 30 days", status: "Active", image: "/250.png" },
10+
{ id: "1002", lockId: "2", description: "100 tokens locked for 60 days", status: "Archived", image: "/250.png" },
11+
{ id: "1003", lockId: "3", description: "100 tokens locked for 60 days", status: "Archived", image: "/250.png" },
1212
];
1313

1414
return { getLocks, getNFTs };

0 commit comments

Comments
 (0)