diff --git a/src/frontend/components/vote/Vote.tsx b/src/frontend/components/vote/Vote.tsx index 32f397a..f7dae69 100644 --- a/src/frontend/components/vote/Vote.tsx +++ b/src/frontend/components/vote/Vote.tsx @@ -99,6 +99,18 @@ export const Vote = () => { setDisableVote(false) } + const handleDoubleClickAdd = (event: React.MouseEvent) => { + const candidateId = event.currentTarget.id + setSelectedCandidates((prev) => [...prev, candidateId]) + setAvailableCandidates((prev) => prev.filter((c) => c !== candidateId)) + } + + const handleDoubleClickRemove = (event: React.MouseEvent) => { + const candidateId = event.currentTarget.id + setAvailableCandidates((prev) => [...prev, candidateId]) + setSelectedCandidates((prev) => prev.filter((c) => c !== candidateId)) + } + useEffect(() => { void (async () => { if (!voterId) { @@ -239,9 +251,11 @@ export const Vote = () => { {(provided) => ( {index + 1}.  {' '} {getCandidateName(candidateId)} @@ -279,9 +293,11 @@ export const Vote = () => { {(provided) => ( {getCandidateName(candidateId)}