-
Notifications
You must be signed in to change notification settings - Fork 7
How to Detect Modal Close or Preferences Update? #13
Copy link
Copy link
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I’m using this library in my Next.js application, and I’ve implemented a button in the footer that opens the preferences modal using the openPreferences method.
Now, I’d like to detect when the modal is closed or when the user updates their preferences. I’ve tried listening for events such as preferences_updated or iubenda_preferences_updated, but they don’t seem to be triggered.
Additionally, I see there’s a dispatchUserPreferences method in the library, but I’m not sure how to use it effectively in this context. Could you please clarify:
- What is the correct way to detect when the modal is closed or the preferences are updated?
- How should dispatchUserPreferences be used in this case?
Any guidance or examples would be greatly appreciated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested