1+ import { useEffect } from "react" ;
12import { Header } from "@/components/Header" ;
23import { MetricCard } from "@/components/MetricCard" ;
34import { 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