'use client'; import { TimeFormatter } from '@/lib/formatters/TimeFormatter'; import { Button } from '@/ui/Button'; import { FeedItem } from '@/ui/FeedItem'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { useEffect, useState } from 'react'; interface FeedItemData { id: string; type: string; headline: string; body?: string; timestamp: string; formattedTime: string; ctaHref?: string; ctaLabel?: string; } async function resolveActor() { return null; } interface FeedItemCardProps { item: FeedItemData; } export function FeedItemCard({ item }: FeedItemCardProps) { const [actor, setActor] = useState<{ name: string; avatarUrl: string } | null>(null); useEffect(() => { let cancelled = false; void (async () => { const resolved = await resolveActor(); if (!cancelled) { setActor(resolved); } })(); return () => { cancelled = true; }; }, [item]); return ( {item.headline} {item.body && {item.body}} } actions={item.ctaHref && item.ctaLabel ? ( ) : undefined} /> ); }