-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cal.com): remove the event listener when scheduling component unm…
…ounts (#161) - update cal.com library - By properly removing the event listener when the component unmounts or dependencies change, we prevent multiple listeners from being active simultaneously, which was causing the duplicate event triggers. - In the cleanup function inside useEffect, we call cal('off', { action: 'bookingSuccessful', callback: bookingSuccessfulCallback }) to remove the event listener.
- Loading branch information
Showing
3 changed files
with
54 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters