import React, { useState, useEffect } from 'react'; import api from '../../utils/api'; import Navbar from '../../components/Navbar'; import MemberFooter from '../../components/MemberFooter'; import { Card } from '../../components/ui/card'; import { Button } from '../../components/ui/button'; import { Badge } from '../../components/ui/badge'; import { toast } from 'sonner'; import { DollarSign, ExternalLink, TrendingUp } from 'lucide-react'; export default function Financials() { const [reports, setReports] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { fetchReports(); }, []); const fetchReports = async () => { try { const response = await api.get('/financials'); setReports(response.data); } catch (error) { toast.error('Failed to load financial reports'); } finally { setLoading(false); } }; if (loading) { return (

Loading financial reports...

); } return (
{/* Header */}

Financial Reports

Access annual financial reports and stay informed about LOAF's fiscal responsibility.

{/* Reports List */} {reports.length === 0 ? (

No financial reports available yet

) : (
{reports.map(report => (
{/* Year Badge */}
{report.year}
Fiscal Year
{/* Report Details */}

{report.title}

{report.document_type === 'google_drive' ? 'Google Drive' : report.document_type.toUpperCase()}
))}
)} {/* Transparency Note */} {reports.length > 0 && (

Transparency & Accountability

LOAF is committed to financial transparency. These reports provide detailed information about our revenue, expenses, and how member contributions support our community programs and operations.

)}
); }