From e2020dc0d646193717d2639725eff9734182c3c7 Mon Sep 17 00:00:00 2001 From: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:52:55 +0530 Subject: [PATCH] Fixed a bug where post reminder modal didn't close (#29615) * Fixed abug where post reminder modal didnt close * Fixed a test --- .../post_reminder_custom_time_picker_modal.tsx | 3 ++- .../generic_modal/__snapshots__/generic_modal.test.tsx.snap | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/channels/src/components/post_reminder_custom_time_picker_modal/post_reminder_custom_time_picker_modal.tsx b/webapp/channels/src/components/post_reminder_custom_time_picker_modal/post_reminder_custom_time_picker_modal.tsx index 51975a5d6b..d38de499fc 100644 --- a/webapp/channels/src/components/post_reminder_custom_time_picker_modal/post_reminder_custom_time_picker_modal.tsx +++ b/webapp/channels/src/components/post_reminder_custom_time_picker_modal/post_reminder_custom_time_picker_modal.tsx @@ -32,7 +32,8 @@ function PostReminderCustomTimePicker({userId, timezone, onExited, postId, actio const handleConfirm = useCallback((dateTime: Moment) => { actions.addPostReminder(userId, postId, toUTCUnix(dateTime.toDate())); - }, [actions, postId, userId]); + onExited(); + }, [actions, postId, userId, onExited]); return (