From dd3153b4696e9bcd844210e7469a6133dc0ae669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 19 Nov 2024 14:21:28 +0100 Subject: [PATCH] pl-fe: fix type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/actions/events.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/actions/events.ts b/packages/pl-fe/src/actions/events.ts index abe34dd0a..b2c19481d 100644 --- a/packages/pl-fe/src/actions/events.ts +++ b/packages/pl-fe/src/actions/events.ts @@ -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) =>