import { useEffect, useState } from 'react' import { estimatePlatformFunds } from '@/lib/fundingCalculation' import { t } from '@/lib/i18n' export function FundingGauge() { const [stats, setStats] = useState(estimatePlatformFunds()) const [loading, setLoading] = useState(true) useEffect(() => { // In a real implementation, this would fetch actual data // For now, we use the estimate const loadStats = async () => { try { const fundingStats = estimatePlatformFunds() setStats(fundingStats) } catch (e) { console.error('Error loading funding stats:', e) } finally { setLoading(false) } } void loadStats() }, []) if (loading) { return (
{t('common.loading')}
{t('home.funding.progress', { percent: progressPercent.toFixed(1) })}
{t('home.funding.description')}