import React from 'react';
import { HeartHandshake, LogOut, DollarSign, Package, ArrowRight, HeartPulse } from 'lucide-react';
import { useAppContext } from '../context/AppContext';
interface DonorViewProps {
onLogout: () => void;
}
export default function DonorView({ onLogout }: DonorViewProps) {
const { dogs } = useAppContext();
// Only show dogs that have been conditionally accepted and need funding/resources
const cases = dogs.filter(d => d.placementStatus === 'conditional');
return (
Rescue-to-Rehab Engine
Donator Portal
Critical Cases Awaiting Placement
These dogs have been approved by specialized centers but require funding or resources to secure their spot.
{cases.length === 0 ? (
There are currently no dogs awaiting conditional placement funding.
) : (
{cases.map(c => {
const goal = c.fundingGoal || 0;
const raised = c.fundingRaised || 0;
const percent = goal > 0 ? Math.round((raised / goal) * 100) : 100;
return (
{c.name}
{c.breed} • {c.age}
Urgent
"{c.donorPitch || c.centerDescription || 'This dog needs your help to secure a spot at a specialized center.'}"
{goal > 0 && (
Funding Goal
${raised} / ${goal}
)}
{c.resourcesNeeded && c.resourcesNeeded.length > 0 && (
Resources Needed:
{c.resourcesNeeded.join(', ')}
)}
Matched: {c.placedCenterName}
);
})}
)}
);
}