Files
thoughts/thoughts-frontend/components/remote-friend-card.tsx
Gabriel Kaszewski 43e36c743b
Some checks failed
lint / lint (push) Failing after 8m39s
test / unit (push) Successful in 16m39s
feat: add /friends page and /settings/friends top-friends management
2026-05-28 04:22:26 +02:00

34 lines
932 B
TypeScript

import { RemoteActor } from "@/lib/api";
import { UserAvatar } from "./user-avatar";
interface RemoteFriendCardProps {
actor: RemoteActor;
}
export function RemoteFriendCard({ actor }: RemoteFriendCardProps) {
return (
<a
href={actor.url}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-4 p-4 -mx-6 hover:bg-accent transition-colors"
>
<UserAvatar
src={actor.avatarUrl}
alt={actor.displayName ?? actor.handle}
/>
<div className="flex-1 min-w-0">
<p className="font-bold truncate">
{actor.displayName || actor.handle}
</p>
<p className="text-sm text-muted-foreground truncate">
@{actor.handle}
</p>
</div>
<span className="text-xs px-2 py-0.5 rounded-full bg-blue-500/10 border border-blue-500/20 text-blue-500 shrink-0">
federated
</span>
</a>
);
}