diff --git a/src/client/components/CandidateCard.tsx b/src/client/components/CandidateCard.tsx new file mode 100644 index 0000000..40223b3 --- /dev/null +++ b/src/client/components/CandidateCard.tsx @@ -0,0 +1,91 @@ +import { formatWeight, formatPrice } from "../lib/formatters"; +import { useUIStore } from "../stores/uiStore"; + +interface CandidateCardProps { + id: number; + name: string; + weightGrams: number | null; + priceCents: number | null; + categoryName: string; + categoryEmoji: string; + imageFilename: string | null; + threadId: number; + isActive: boolean; +} + +export function CandidateCard({ + id, + name, + weightGrams, + priceCents, + categoryName, + categoryEmoji, + imageFilename, + threadId, + isActive, +}: CandidateCardProps) { + const openCandidateEditPanel = useUIStore((s) => s.openCandidateEditPanel); + const openConfirmDeleteCandidate = useUIStore( + (s) => s.openConfirmDeleteCandidate, + ); + const openResolveDialog = useUIStore((s) => s.openResolveDialog); + + return ( +
+ Are you sure you want to delete{" "} + {candidateName}? This action + cannot be undone. +
++ Pick {candidateName} as the + winner? This will add it to your collection and archive the thread. +
+Thread {threadId} - detail page placeholder
+ {/* Header */} ++ {winningCandidate.name} was + picked as the winner and added to your collection. +
++ Add your first candidate to start comparing. +
+