"use client" import { useState, useEffect } from "react" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Activity, Shield, Heart, Clock } from "lucide-react" // Mock data for activity feed const INITIAL_ACTIVITIES: any[] = [] // Helper function to get badge color based on activity type const getActivityColor = (type: string) => { switch (type) { case "verification": return "bg-guardian/20 text-guardian hover:bg-guardian/30" case "donation": return "bg-pulse/20 text-pulse hover:bg-pulse/30" case "registration": return "bg-flame/20 text-flame hover:bg-flame/30" case "achievement": return "bg-neon/20 text-neon hover:bg-neon/30" default: return "bg-gray-500/20 text-gray-400 hover:bg-gray-500/30" } } export function PulseActivity() { const [activities, setActivities] = useState(INITIAL_ACTIVITIES) const [filter, setFilter] = useState("all") // Simulate real-time updates useEffect(() => { // In a real implementation, this would connect to a WebSocket or polling API // For now, we'll leave it empty to allow manual data entry return () => {} // Empty cleanup function }, []) // Filter activities const filteredActivities = filter === "all" ? activities : activities.filter((activity) => activity.type === filter) return (
Live Activity Feed
setFilter("all")} > All setFilter("verification")} > Verifications setFilter("donation")} > Donations
{filteredActivities.map((activity) => (
{activity.user} {activity.action} {activity.target}
{activity.time} {activity.location}
{activity.type}
))} {filteredActivities.length === 0 && (

No Activity Yet

Activities will appear here as users interact with the platform.

)}
) }