import React from 'react'; import { ExternalLink, Users, DollarSign, Heart, Mail, Phone, Globe } from 'lucide-react'; /** * SplitScreenView Component * Shows government decisions on the left, community nonprofits on the right * Demonstrates the accountability gap and community response */ export default function SplitScreenView({ decision, nonprofits = [] }) { // Find nonprofits matching this decision's NTEE code const matchingNonprofits = nonprofits.filter(np => np.ntee_code === decision.ntee_code || (decision.ntee_code && np.ntee_code?.startsWith(decision.ntee_code[0])) // Match category ); const hasGap = decision.community_gap?.nonprofit_filling_gap; return (
{/* LEFT RAIL: The Public Sector (Government Decision) */}
🏛️ Public Sector Decision

{decision.decision_summary}

Official Rationale:
"{decision.primary_rationale}"
{hasGap && (
⚠️ The Accountability Gap
{decision.community_gap.description}
)}
Outcome: {decision.outcome}
Vote: {decision.vote_result}
Date: {new Date(decision.meeting_date).toLocaleDateString()}
{/* RIGHT RAIL: The Community Sector (Nonprofits) */}
🤝 Community Sector Response
{matchingNonprofits.length === 0 ? (

No nonprofits found filling this gap yet.

NTEE Code: {decision.ntee_code || 'Not classified'}

) : ( <>
{matchingNonprofits.length} organization{matchingNonprofits.length !== 1 ? 's' : ''} filling this gap:
{matchingNonprofits.map((nonprofit, i) => ( ))}
💡 Bridge the Gap
  • Support these organizations with donations or volunteering
  • Join their boards to influence systemic change
  • Cite their work in public meetings to show solutions exist
)}
); } function NonprofitCard({ nonprofit }) { return (

{nonprofit.name}

NTEE {nonprofit.ntee_code}: {nonprofit.ntee_description}
{nonprofit.mission}
{/* Services */}
Services Provided:
{/* Impact */}
{nonprofit.students_served && (
Impact
{nonprofit.students_served.toLocaleString()} students
)} {nonprofit.families_served && (
Impact
{nonprofit.families_served.toLocaleString()} families
)} {nonprofit.youth_served && (
Impact
{nonprofit.youth_served.toLocaleString()} youth
)}
Annual Budget
{(nonprofit.annual_budget / 1000).toFixed(0)}K
{/* Contact & Actions */}
{nonprofit.contact.website && ( Website )} {nonprofit.contact.email && ( Email )}
{/* Opportunities */}
{nonprofit.volunteer_opportunities && ( ✓ Accepting Volunteers )} {nonprofit.accepting_board_members && ( ⭐ Board Seats Available )}
); }