Skip to content

Commit c78a7b7

Browse files
committed
add sections
change q4/3
1 parent 39e78ff commit c78a7b7

File tree

3 files changed

+76
-48
lines changed

3 files changed

+76
-48
lines changed

src/components/AuditReport.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FileText, CheckCircle, AlertCircle, Clock, ExternalLink } from "lucide-
33
const auditReports = [
44
{
55
id: 1,
6-
title: "Q4 2024 Financial Audit",
6+
title: "Q3 2024 Financial Audit",
77
date: "Dec 15, 2024",
88
status: "completed",
99
auditor: "",
@@ -34,7 +34,10 @@ export const AuditReport = () => {
3434
<div className="rounded-xl bg-card border border-border p-6 animate-fade-in" style={{ animationDelay: "400ms" }}>
3535
<div className="flex items-center justify-between mb-6">
3636
<div>
37-
<h3 className="text-lg font-semibold text-foreground">Audit Report</h3>
37+
<h3
38+
className="text-lg font-semibold text-foreground hover:text-primary transition-colors cursor-pointer"
39+
onClick={() => history.replaceState(null, '', '#audits')}
40+
>Audit Report</h3>
3841
<p className="text-sm text-muted-foreground">Recent audits and reviews</p>
3942
</div>
4043
<button className="text-sm text-primary hover:underline">View All</button>

src/components/Roadmap.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ export function Roadmap() {
6363
<div className="p-6 border-b border-border">
6464
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
6565
<div>
66-
<h3 className="text-lg font-semibold text-foreground flex items-center gap-2">
66+
<h3
67+
className="text-lg font-semibold text-foreground hover:text-primary transition-colors flex items-center gap-2 cursor-pointer"
68+
onClick={() => history.replaceState(null, '', '#roadmap')}
69+
>
6770
<Calendar className="h-5 w-5 text-primary" />
6871
Roadmap
6972
</h3>

src/pages/Index.tsx

Lines changed: 67 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { useEffect } from "react";
12
import { Header } from "@/components/Header";
23
import { MetricCard } from "@/components/MetricCard";
34
import { BudgetOverview } from "@/components/BudgetOverview";
@@ -21,6 +22,18 @@ const Index = () => {
2122
const operationalWallet = balanceData?.wallets.find(w => w.label === 'Operational');
2223
const treasuryWallet = balanceData?.wallets.find(w => w.label === 'Treasury');
2324

25+
useEffect(() => {
26+
const hash = window.location.hash;
27+
if (hash) {
28+
setTimeout(() => {
29+
const el = document.querySelector(hash);
30+
if (el) {
31+
el.scrollIntoView({ behavior: 'smooth' });
32+
}
33+
}, 500);
34+
}
35+
}, []);
36+
2437
return (
2538
<div className="min-h-screen bg-background">
2639
{/* Background gradient effect */}
@@ -35,62 +48,71 @@ const Index = () => {
3548
<p className="text-muted-foreground mt-1">Here you can check how DCL Regenesis Labs is allocating the funds.</p>
3649
</div>
3750

38-
{/* Metric Cards */}
39-
<div className="grid gap-4 md:gap-6 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 mb-8">
40-
<MetricCard
41-
title="Total Portfolio Value"
42-
value={isLoading ? 'Loading...' : balanceData ? formatUsdValue(balanceData.totalPortfolioValue) : 'N/A'}
43-
change={balanceData ? `Updated ${new Date(balanceData.timestamp).toLocaleDateString()}` : ''}
44-
changeType="neutral"
45-
icon={Wallet}
46-
delay={0}
47-
/>
48-
<MetricCard
49-
title="Operational Wallet"
50-
value={isLoading ? 'Loading...' : operationalWallet ? formatUsdValue(operationalWallet.totalUsdValue) : 'N/A'}
51-
change=""
52-
changeType="neutral"
53-
icon={TrendingUp}
54-
delay={50}
55-
/>
56-
<MetricCard
57-
title="Treasury Wallet"
58-
value={isLoading ? 'Loading...' : treasuryWallet ? formatUsdValue(treasuryWallet.totalUsdValue) : 'N/A'}
59-
change=""
60-
changeType="neutral"
61-
icon={TrendingDown}
62-
delay={100}
63-
/>
64-
</div>
51+
<section id="treasury" className="scroll-mt-20">
52+
<h2
53+
className="text-xl font-semibold text-foreground hover:text-primary transition-colors cursor-pointer inline-block mb-4"
54+
onClick={() => history.replaceState(null, '', '#treasury')}
55+
>Treasury Overview</h2>
56+
{/* Metric Cards */}
57+
<div className="grid gap-4 md:gap-6 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 mb-8">
58+
<MetricCard
59+
title="Total Portfolio Value"
60+
value={isLoading ? 'Loading...' : balanceData ? formatUsdValue(balanceData.totalPortfolioValue) : 'N/A'}
61+
change={balanceData ? `Updated ${new Date(balanceData.timestamp).toLocaleDateString()}` : ''}
62+
changeType="neutral"
63+
icon={Wallet}
64+
delay={0}
65+
/>
66+
<MetricCard
67+
title="Operational Wallet"
68+
value={isLoading ? 'Loading...' : operationalWallet ? formatUsdValue(operationalWallet.totalUsdValue) : 'N/A'}
69+
change=""
70+
changeType="neutral"
71+
icon={TrendingUp}
72+
delay={50}
73+
/>
74+
<MetricCard
75+
title="Treasury Wallet"
76+
value={isLoading ? 'Loading...' : treasuryWallet ? formatUsdValue(treasuryWallet.totalUsdValue) : 'N/A'}
77+
change=""
78+
changeType="neutral"
79+
icon={TrendingDown}
80+
delay={100}
81+
/>
82+
</div>
6583

66-
{/* Wallet Cards */}
67-
<div className="grid gap-4 md:gap-6 grid-cols-1 sm:grid-cols-2 items-start mb-8">
68-
<WalletCard
69-
wallet={operationalWallet}
70-
title="Operational Wallet"
71-
isLoading={isLoading}
72-
delay={150}
73-
/>
74-
<WalletCard
75-
wallet={treasuryWallet}
76-
title="Treasury Wallet"
77-
isLoading={isLoading}
78-
delay={200}
79-
/>
80-
</div>
84+
{/* Wallet Cards */}
85+
<div className="grid gap-4 md:gap-6 grid-cols-1 sm:grid-cols-2 items-start mb-8">
86+
<WalletCard
87+
wallet={operationalWallet}
88+
title="Operational Wallet"
89+
isLoading={isLoading}
90+
delay={150}
91+
/>
92+
<WalletCard
93+
wallet={treasuryWallet}
94+
title="Treasury Wallet"
95+
isLoading={isLoading}
96+
delay={200}
97+
/>
98+
</div>
99+
</section>
81100

82101
{/* Budget Overview Section */}
83102
<div className="grid gap-6 lg:grid-cols-2 mb-8">
84103
<BudgetOverview />
85104
<BudgetCategories />
86105
</div>
87106

88-
{/* Quick Actions Card */}
89107
{/* Audit Report Section */}
90-
<AuditReport />
108+
<section id="audits" className="scroll-mt-20">
109+
<AuditReport />
110+
</section>
91111

92112
{/* Roadmap Section */}
93-
<Roadmap />
113+
<section id="roadmap" className="scroll-mt-20">
114+
<Roadmap />
115+
</section>
94116
{/* <div className="mb-8 flex justify-center">
95117
<div className="rounded-xl bg-card border border-border p-6 animate-slide-up w-full max-w-md" style={{ animationDelay: "350ms" }}>
96118
<div className="mb-6">

0 commit comments

Comments
 (0)