mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-01 18:21:52 +02:00
Bug fixes (#191)
This commit is contained in:
parent
9fdbe46d19
commit
900fac5735
2 changed files with 6 additions and 4 deletions
|
@ -9,9 +9,10 @@ export const normalizeVotes = (
|
|||
optionIds: string[],
|
||||
votes: ParticipantForm["votes"],
|
||||
) => {
|
||||
return optionIds.map(
|
||||
(optionId, i) => votes[i] ?? { optionId, type: "no" as const },
|
||||
);
|
||||
return optionIds.map((optionId, i) => ({
|
||||
optionId,
|
||||
type: votes[i]?.type ?? ("no" as const),
|
||||
}));
|
||||
};
|
||||
|
||||
export const useAddParticipantMutation = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue