fix(useLogoutAccessDenied): handle errors without redirect
Problem
Undefined redirectTo values throws error Fix #10177
Solution
Create a handleRedirect function to properly handle either valid URL or undefined URLS
How To Test
Steps to reproduce
Follow steps from #10177
Additional Checks
- [x] The PR targets
masterfor a bugfix or a documentation fix, ornextfor a feature - [ ] The PR includes unit tests (if not possible, describe why)
- [ ] The PR includes one or several stories (if not possible, describe why)
- [ ] The documentation is up to date
Also, please make sure to read the contributing guidelines.
Evidence
Thanks for the PR! Would you mind adding some too? @djhi, I might not have understood what you're requesting. Could you clarify your change request a bit more? please
Thanks for the PR! Would you mind adding some too? @djhi, I might not have understood what you're requesting. Could you clarify your change request a bit more? please
Oups, sorry for the typo... Can you add some unit tests as well?
Thanks for the PR! Would you mind adding some too? @djhi, I might not have understood what you're requesting. Could you clarify your change request a bit more? please
Oups, sorry for the typo... Can you add some unit tests as well?
Unit test added