import { cookies } from "next/headers"; import { notFound } from "next/navigation"; import { getFollowingList, getMe } from "@/lib/api"; import { UserListCard } from "@/components/user-list-card"; import { RemoteFollowing } from "@/components/federation/remote-following"; interface FollowingPageProps { params: Promise<{ username: string }>; } export default async function FollowingPage({ params }: FollowingPageProps) { const { username } = await params; const token = (await cookies()).get("auth_token")?.value ?? null; const [followingData, me] = await Promise.all([ getFollowingList(username, token).catch(() => null), token ? getMe(token).catch(() => null) : null, ]); if (!followingData) { notFound(); } const isOwnProfile = me?.username === username; return (
Users that @{username} follows.