feat(frontend): show @handle and link to profile in federation actor lists

This commit is contained in:
2026-05-15 04:28:36 +02:00
parent d98c338e52
commit d88eb5d127
3 changed files with 24 additions and 12 deletions

View File

@@ -6,6 +6,7 @@ import { useAuth } from "@/hooks/use-auth";
import { UserAvatar } from "@/components/user-avatar";
import { Button } from "@/components/ui/button";
import { toast } from "sonner";
import Link from "next/link";
export function RemoteFollowing() {
const { token } = useAuth();
@@ -36,7 +37,10 @@ export function RemoteFollowing() {
<ul className="space-y-3">
{following.map((actor) => (
<li key={actor.url} className="flex items-center justify-between gap-3">
<div className="flex items-center gap-2 min-w-0">
<Link
href={`/users/@${actor.handle}`}
className="flex items-center gap-2 min-w-0 hover:opacity-80"
>
<UserAvatar
src={actor.avatarUrl}
alt={actor.displayName}
@@ -46,11 +50,11 @@ export function RemoteFollowing() {
<p className="text-sm font-medium truncate">
{actor.displayName || actor.handle}
</p>
<p className="text-xs text-muted-foreground truncate">
{actor.handle}
<p className="text-xs text-muted-foreground truncate font-mono">
@{actor.handle}
</p>
</div>
</div>
</Link>
<Button
size="sm"
variant="outline"