11'use client' ;
22
33import { Suspense , useState } from 'react' ;
4+ import { useTranslation } from 'react-i18next' ;
45import { DashboardLayout } from '@/components/layouts/DashboardLayout' ;
56import { TransactionHistorySection } from '@/components/TransactionHistorySection' ;
67import { TransactionSimulator } from '@/components/TransactionSimulator' ;
@@ -10,32 +11,58 @@ import { PortfolioAssets } from '@/components/PortfolioAssets';
1011import { VaultTable } from '@/components/vaults/VaultTable' ;
1112import { PluginGrid } from '@/components/dashboard/PluginGrid' ;
1213
14+ import { SwapCard } from '@/components/swap/SwapCard' ;
15+
1316import { ErrorBoundary } from '@/components/ErrorBoundary' ;
17+ import { ProtocolStatsBar } from '@/components/dashboard/ProtocolStatsBar' ;
18+ import { RecentSwaps } from '@/components/dashboard/RecentSwaps' ;
1419
1520export default function DashboardPage ( ) {
21+ const { t } = useTranslation ( ) ;
1622 const [ sendOpen , setSendOpen ] = useState ( false ) ;
1723
1824 return (
1925 < DashboardLayout >
2026 < div className = "grid grid-cols-1 gap-4 lg:grid-cols-2" >
27+ < section id = "swap" className = "lg:col-span-2" >
28+ < ErrorBoundary >
29+ < SwapCard />
30+ </ ErrorBoundary >
31+ </ section >
32+
33+ < section id = "protocol-stats" className = "lg:col-span-2" >
34+ < ErrorBoundary >
35+ < ProtocolStatsBar />
36+ </ ErrorBoundary >
37+ </ section >
38+
2139 < section id = "staking" className = "card" >
2240 < h2 className = "text-sm font-semibold text-gray-900" > Staking</ h2 >
2341 < ErrorBoundary >
2442 < p className = "mt-2 text-sm text-gray-600" > No active stakes yet.</ p >
43+ < h2 className = "text-sm font-semibold text-gray-900" > { t ( 'dashboard.staking' ) } </ h2 >
44+ < ErrorBoundary >
45+ < p className = "mt-2 text-sm text-gray-600" > { t ( 'dashboard.noStakes' ) } </ p >
2546 </ ErrorBoundary >
2647 </ section >
2748
2849 < section id = "governance" className = "card" >
29- < h2 className = "text-sm font-semibold text-gray-900" > Governance</ h2 >
30- < p className = "mt-2 text-sm text-gray-600" > No open proposals.</ p >
50+ < h2 className = "text-sm font-semibold text-gray-900" > { t ( 'dashboard.governance' ) } </ h2 >
51+ < p className = "mt-2 text-sm text-gray-600" > { t ( 'dashboard.noProposals' ) } </ p >
52+ </ section >
53+
54+ < section id = "recent-swaps" className = "lg:col-span-2" >
55+ < ErrorBoundary >
56+ < RecentSwaps />
57+ </ ErrorBoundary >
3158 </ section >
3259
3360 < section id = "portfolio" className = "card lg:col-span-2" >
3461 < ErrorBoundary >
3562 < PortfolioAssets />
3663 </ ErrorBoundary >
3764 < button type = "button" className = "btn mt-3" onClick = { ( ) => setSendOpen ( true ) } >
38- Send asset
65+ { t ( 'dashboard.sendAsset' ) }
3966 </ button >
4067 </ section >
4168
0 commit comments