well, you could set up a `stopPolling()` function inside of the `useInterval()` hook that would work similar to the `return () => clearInterval(id)` that fires now when the component calling the hook unmounts from the DOM.
This stopPolling would clear interval and set savedCallback.current = null. Then you could return `stopPolling` as another function from the hook into the component using it, and in the component, if you set a local variable like a boolean to true or false after the report's been generated, you could then call `stopPolling()` to stop it from continuing to run.