Skip to content

Commit

Permalink
Stats: Remove timeout when closing feedback modal (#95015)
Browse files Browse the repository at this point in the history
  • Loading branch information
a8ck3n authored Sep 30, 2024
1 parent 053d4fc commit 62a5d45
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions client/my-sites/stats/feedback/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ const FeedbackModal: React.FC< ModalProps > = ( { siteId, onClose } ) => {

const handleClose = useCallback(
( isDirectClose: boolean = false ) => {
setTimeout( () => {
onClose();
onClose();

if ( isDirectClose ) {
trackStatsAnalyticsEvent( 'stats_feedback_action_directly_close_form_modal' );
}
}, 200 );
if ( isDirectClose ) {
trackStatsAnalyticsEvent( 'stats_feedback_action_directly_close_form_modal' );
}
},
[ onClose ]
);
Expand Down

0 comments on commit 62a5d45

Please sign in to comment.