import { createFileRoute, Link } from '@tanstack/react-router' import { marked } from 'marked' import { Clock, User, ArrowLeft, Tag } from 'lucide-react' import { allTalks, allSpeakers } from 'content-collections' import RemyAssistant from '#/components/RemyAssistant' export const Route = createFileRoute('/talks/$slug')({ loader: async ({ params }) => { const talk = allTalks.find((t) => t.slug === params.slug) if (!talk) { throw new Error('Talk not found') } const speaker = allSpeakers.find((s) => s.name === talk.speaker) return { talk, speaker } }, component: TalkDetailPage, }) function TalkDetailPage() { const { talk, speaker } = Route.useLoaderData() return (
{/* Back navigation */}
All Sessions
{/* Hero image */}
{talk.title}
{/* Content */}
{/* Topics */}
{talk.topics.map((topic) => ( {topic} ))}
{/* Title */}

{talk.title}

{/* Meta info */}
{/* Speaker link */} {speaker ? (
{speaker.name}

{talk.speaker}

{speaker.restaurant}

) : (
{talk.speaker}
)} {/* Duration */}
{talk.duration}
{/* Description content */}
) }