import { createFileRoute, Link } from "@tanstack/react-router"; import { CandidateCard } from "../../components/CandidateCard"; import { useUpdateCandidate } from "../../hooks/useCandidates"; import { useThread } from "../../hooks/useThreads"; import { LucideIcon } from "../../lib/iconData"; import { useUIStore } from "../../stores/uiStore"; export const Route = createFileRoute("/threads/$threadId")({ component: ThreadDetailPage, }); function ThreadDetailPage() { const { threadId: threadIdParam } = Route.useParams(); const threadId = Number(threadIdParam); const { data: thread, isLoading, isError } = useThread(threadId); const openCandidateAddPanel = useUIStore((s) => s.openCandidateAddPanel); const updateCandidate = useUpdateCandidate(threadId); if (isLoading) { return (
{winningCandidate.name} was picked as the winner and added to your collection.
Add your first candidate to start comparing.