I have a menu where users can navigate between pages. Upon clicking a menu option, a callback is executed, and the user is directed to the desired page. Unfortunately, on each page, several actions are executed upon page load.
The issue arises when a user clicks a menu option multiple times, triggering all "On Page load" actions each time. For instance, I have a conditional that displays a bottom sheet on page load, depending on the situation. In such cases, if the user clicks three times, three bottom sheets are displayed consecutively.
What would be the best approach to handle situations like this?