feat(frontend): show @handle and link to profile in federation actor lists
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user