-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathpage.tsx
More file actions
67 lines (62 loc) · 2 KB
/
page.tsx
File metadata and controls
67 lines (62 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
"use client";
import { Navbar } from "@/components/Navbar";
import { GroupCard } from "@/components/GroupCard";
import { SavingsGroup, GroupStatus } from "@sorosave/sdk";
// Placeholder data for development — will be replaced with contract queries
const PLACEHOLDER_GROUPS: SavingsGroup[] = [
{
id: 1,
name: "Lagos Savings Circle",
admin: "GABCDEFGHIJKLMNOPQRSTUVWXYZ234567ABCDEFG",
token: "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC",
contributionAmount: 1000000000n,
cycleLength: 604800,
maxMembers: 5,
members: ["GABCD...", "GEFGH...", "GIJKL..."],
payoutOrder: [],
currentRound: 0,
totalRounds: 5,
status: GroupStatus.Forming,
createdAt: 1700000000,
},
{
id: 2,
name: "DeFi Builders Fund",
admin: "GABCDEFGHIJKLMNOPQRSTUVWXYZ234567ABCDEFG",
token: "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC",
contributionAmount: 5000000000n,
cycleLength: 2592000,
maxMembers: 10,
members: ["GABCD...", "GEFGH...", "GIJKL...", "GMNOP...", "GQRST..."],
payoutOrder: ["GABCD...", "GEFGH...", "GIJKL...", "GMNOP...", "GQRST..."],
currentRound: 2,
totalRounds: 5,
status: GroupStatus.Active,
createdAt: 1699000000,
},
];
export default function GroupsPage() {
// TODO: Replace with actual contract queries
const groups = PLACEHOLDER_GROUPS;
return (
<>
<Navbar />
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<div className="flex justify-between items-center mb-8">
<h1 className="text-2xl font-bold text-gray-900">Savings Groups</h1>
</div>
{groups.length === 0 ? (
<div className="text-center py-12 text-gray-500">
No groups found. Create the first one!
</div>
) : (
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
{groups.map((group) => (
<GroupCard key={group.id} group={group} />
))}
</div>
)}
</main>
</>
);
}