"use client"; import { useEffect, useRef, useMemo } from "react"; import { formatAddress } from "@/lib/utils"; import { format } from "date-fns"; import { gsap } from "gsap"; interface Transaction { id: string; proposalId: number; to: string; value: string; status: "pending" | "executed" | "rejected"; createdAt: Date; } export function RecentActivity() { // TODO: Fetch recent transactions from backend/indexer const transactions = useMemo(() => [], []); // Placeholder const containerRef = useRef(null); useEffect(() => { if (containerRef.current && transactions.length > 0) { const items = containerRef.current.children; gsap.from(items, { opacity: 0, x: -20, duration: 0.5, stagger: 0.1, ease: "power2.out", }); } }, [transactions]); return (

Recent Activity

{transactions.length === 0 ? (
No recent transactions
) : (
{transactions.map((tx) => (
#{tx.proposalId} {tx.status}
To: {formatAddress(tx.to)}
{format(new Date(tx.createdAt), "MMM dd, yyyy HH:mm")}
{tx.value} ETH
))}
)}
); }