React has a hook useLocation which is the recommended way to get values from the global window
Currently Cashtab is using a mix of both approaches. Most of the time useLocation is used, but sometimes we use window.location
Remove remaining instances of window.location and replace with hook. Update relevant unit tests to mock route instead of mocking the global window object.