Ionosphere.tv
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: wire mentions data from API to talk page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+12 -4
+2 -1
apps/ionosphere/src/app/talks/[rkey]/TalkContent.tsx
··· 11 11 talk: any; 12 12 speakers: any[]; 13 13 concepts: any[]; 14 + mentions: any[]; 14 15 } 15 16 16 17 interface VideoSource { ··· 21 22 confidence?: string; 22 23 } 23 24 24 - export default function TalkContent({ talk, speakers, concepts }: TalkContentProps) { 25 + export default function TalkContent({ talk, speakers, concepts, mentions }: TalkContentProps) { 25 26 const [comments, setComments] = useState<CommentData[]>([]); 26 27 27 28 // Parse video sources
+6 -3
apps/ionosphere/src/app/talks/[rkey]/page.tsx
··· 1 1 import type { Metadata } from "next"; 2 - import { getTalk, getTalks } from "@/lib/api"; 2 + import { getTalk, getTalks, getMentions } from "@/lib/api"; 3 3 import TalkContent from "./TalkContent"; 4 4 5 5 export async function generateStaticParams() { ··· 33 33 34 34 export default async function TalkPage({ params }: { params: Promise<{ rkey: string }> }) { 35 35 const { rkey } = await params; 36 - const { talk, speakers, concepts } = await getTalk(rkey); 36 + const [{ talk, speakers, concepts }, { mentions }] = await Promise.all([ 37 + getTalk(rkey), 38 + getMentions(rkey), 39 + ]); 37 40 38 - return <TalkContent talk={talk} speakers={speakers} concepts={concepts} />; 41 + return <TalkContent talk={talk} speakers={speakers} concepts={concepts} mentions={mentions} />; 39 42 }
+4
apps/ionosphere/src/lib/api.ts
··· 30 30 return fetchApi<{ concept: any; talks: any[] }>(`/xrpc/tv.ionosphere.getConcept?rkey=${encodeURIComponent(rkey)}`); 31 31 } 32 32 33 + export async function getMentions(talkRkey: string) { 34 + return fetchApi<{ mentions: any[]; total: number }>(`/xrpc/tv.ionosphere.getMentions?talkRkey=${encodeURIComponent(talkRkey)}`); 35 + } 36 + 33 37 export async function getIndex() { 34 38 return fetchApi<{ entries: any[] }>("/xrpc/tv.ionosphere.getConcordance"); 35 39 }