pl-fe: fix type

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-11-19 14:21:28 +01:00
parent 5de47881b7
commit dd3153b469

View file

@ -200,7 +200,7 @@ const leaveEvent = (statusId: string) =>
dispatch(importEntities({ statuses: [data] }));
dispatch(leaveEventSuccess(status.id));
}).catch((error) => {
dispatch(leaveEventFail(error, status.id));
dispatch(leaveEventFail(error, status.id, status?.event?.join_state || null));
});
};
@ -214,10 +214,11 @@ const leaveEventSuccess = (statusId: string) => ({
statusId,
});
const leaveEventFail = (error: unknown, statusId: string) => ({
const leaveEventFail = (error: unknown, statusId: string, previousState: string | null) => ({
type: EVENT_LEAVE_FAIL,
statusId,
error,
previousState,
});
const fetchEventParticipations = (statusId: string) =>