How to stop a custom action from executing when navigating to another page

Actions & Logic

Hello, I have a custom action that is executed in my login page (it is a "periodic" action - gets executed every 5 seconds). It also gets executed in my home page. I notice that when I logout from the app and login, when I go to the home page, the page does not get filled in with data from API calls, which made me suspect there is an issue with the custom action. When I remove the custom action, everything works fine. So my question is how can I stop the custom action from executing when I leave the Login page?

What have you tried so far?

Tried implementing it

Did you check FlutterFlow's Documentation for this topic?
Yes
1
3 replies