Bug fixes (#191)

This commit is contained in:
Luke Vella 2022-05-25 17:04:17 +01:00 committed by GitHub
parent 9fdbe46d19
commit 900fac5735
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -160,7 +160,8 @@ const MonthCalendar: React.VoidFunctionComponent<DateTimePickerProps> = ({
"relative flex h-12 items-center justify-center text-sm hover:bg-slate-50 focus:ring-0 focus:ring-offset-0 active:bg-slate-100",
{
"bg-slate-50 text-slate-400": day.outOfMonth,
"font-bold text-indigo-500": day.today,
"font-bold": day.today,
"text-indigo-500": day.today && !day.selected,
"border-r": (i + 1) % 7 !== 0,
"border-b": i < datepicker.days.length - 7,
"font-normal text-white after:absolute after:-z-0 after:h-8 after:w-8 after:animate-popIn after:rounded-full after:bg-green-500 after:content-['']":

View file

@ -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 = () => {