import Link from "next/link"; import { ExternalLink } from "lucide-react"; import { ReactNode } from "react"; import { RemoteActor } from "@/lib/api"; import { UserAvatar } from "@/components/user-avatar"; import { Button } from "@/components/ui/button"; interface ProfileCardProps { actor: RemoteActor; /** Slot rendered next to the avatar (e.g. follow/unfollow button). */ action?: ReactNode; } export function ProfileCard({ actor, action }: ProfileCardProps) { return ( <>
{action}

{actor.displayName ?? actor.handle}

{actor.handle}

{actor.bio && (
)} {actor.alsoKnownAs && (

Also known as:{" "} {actor.alsoKnownAs}

)} {actor.attachment.length > 0 && (
{actor.attachment.map((field) => (
{field.name}
))}
)} ); }