File size: 5,012 Bytes
78d0e31 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
import type { User } from "@/lib/user-database"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Heart, Users, MapPin, DollarSign, Activity } from "lucide-react"
interface ProfileImpactProps {
user: User
}
export function ProfileImpact({ user }: ProfileImpactProps) {
return (
<div className="space-y-6">
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
{user.type === "guardian" ? (
<>
<Card className="bg-dusk border border-guardian/20">
<CardContent className="pt-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm text-gray-400">Total Donated</p>
<h3 className="text-2xl font-bold text-guardian">${user.impact.totalDonated}</h3>
</div>
<div className="p-3 rounded-full bg-guardian/10">
<DollarSign className="h-6 w-6 text-guardian" />
</div>
</div>
</CardContent>
</Card>
<Card className="bg-dusk border border-guardian/20">
<CardContent className="pt-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm text-gray-400">Donations Made</p>
<h3 className="text-2xl font-bold text-guardian">{user.impact.donationsCount}</h3>
</div>
<div className="p-3 rounded-full bg-guardian/10">
<Activity className="h-6 w-6 text-guardian" />
</div>
</div>
</CardContent>
</Card>
<Card className="bg-dusk border border-guardian/20">
<CardContent className="pt-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm text-gray-400">Healers Supported</p>
<h3 className="text-2xl font-bold text-guardian">{user.impact.healthWorkersSupported}</h3>
</div>
<div className="p-3 rounded-full bg-guardian/10">
<Heart className="h-6 w-6 text-guardian" />
</div>
</div>
</CardContent>
</Card>
</>
) : (
<>
<Card className="bg-dusk border border-flame/20">
<CardContent className="pt-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm text-gray-400">Patients Served</p>
<h3 className="text-2xl font-bold text-flame">{user.impact.patientsServed}</h3>
</div>
<div className="p-3 rounded-full bg-flame/10">
<Users className="h-6 w-6 text-flame" />
</div>
</div>
</CardContent>
</Card>
<Card className="bg-dusk border border-flame/20">
<CardContent className="pt-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm text-gray-400">Communities Reached</p>
<h3 className="text-2xl font-bold text-flame">{user.impact.communitiesReached}</h3>
</div>
<div className="p-3 rounded-full bg-flame/10">
<MapPin className="h-6 w-6 text-flame" />
</div>
</div>
</CardContent>
</Card>
<Card className="bg-dusk border border-flame/20">
<CardContent className="pt-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm text-gray-400">Donations Received</p>
<h3 className="text-2xl font-bold text-flame">${user.impact.donationsReceived}</h3>
</div>
<div className="p-3 rounded-full bg-flame/10">
<DollarSign className="h-6 w-6 text-flame" />
</div>
</div>
</CardContent>
</Card>
</>
)}
</div>
<Card className="bg-dusk border border-gray-700">
<CardHeader>
<CardTitle>Impact Visualization</CardTitle>
</CardHeader>
<CardContent>
<div className="h-64 flex items-center justify-center">
<div className="text-center text-gray-500">
<Activity className="h-16 w-16 mx-auto mb-4 opacity-50" />
<p>Impact visualization will be displayed here</p>
<p className="text-sm mt-2">As you make or receive contributions, your impact will be visualized here</p>
</div>
</div>
</CardContent>
</Card>
</div>
)
}
|