We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c166a95 commit 6015e5dCopy full SHA for 6015e5d
packages/ra-core/src/auth/useLogoutIfAccessDenied.ts
@@ -44,13 +44,16 @@ const useLogoutIfAccessDenied = (): LogoutIfAccessDenied => {
44
const notify = useNotify();
45
const navigate = useNavigate();
46
47
- const handleRedirect = useCallback((url: string) => {
48
- if (url.startsWith('http')) {
49
- window.location.href = url;
50
- } else {
51
- navigate(url);
52
- }
53
- }, []);
+ const handleRedirect = useCallback(
+ (url: string) => {
+ if (url.startsWith('http')) {
+ window.location.href = url;
+ } else {
+ navigate(url);
+ }
54
+ },
55
+ [navigate]
56
+ );
57
58
const logoutIfAccessDenied = useCallback(
59
(error?: any) => {
0 commit comments