diff --git a/app/share/[id]/page.tsx b/app/share/[id]/page.tsx index bde5b57..55695d1 100644 --- a/app/share/[id]/page.tsx +++ b/app/share/[id]/page.tsx @@ -12,7 +12,6 @@ import { DeleteShareButton, } from "@/app/share/[id]/share-client"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; -import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, @@ -32,6 +31,7 @@ import { Separator } from "@/components/ui/separator"; import { authOptions } from "@/lib/auth/auth-options"; import { getAdminDiscordIds, getSessionDiscordId } from "@/lib/auth/auth"; import { cdnUrl } from "@/lib/cdn-images"; +import { getDiscordMemberProfile } from "@/lib/discord/discord"; export const dynamic = "force-dynamic"; @@ -81,6 +81,11 @@ export default async function SharedTextPage({ .limit(1); if (!share) notFound(); + const authorProfile = await getDiscordMemberProfile( + share.authorDiscordId, + ); + const authorAvatarUrl = authorProfile?.avatarUrl || share.authorAvatarUrl; + const requestedSort = Array.isArray(query.comments) ? query.comments[0] : query.comments; @@ -118,11 +123,11 @@ export default async function SharedTextPage({