From ab8d70ca16276a0b468a64037d94ed02fc092365 Mon Sep 17 00:00:00 2001 From: Eduard Gert Date: Thu, 5 Jun 2025 19:19:14 +0200 Subject: [PATCH] Do not redirect on same page --- src/hooks/useRedirect.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useRedirect.tsx b/src/hooks/useRedirect.tsx index 0a67082b..90edd900 100644 --- a/src/hooks/useRedirect.tsx +++ b/src/hooks/useRedirect.tsx @@ -17,7 +17,8 @@ export const useRedirect = ( useEffect(() => { // If redirect is disabled or the url is already in the callback urls then do not redirect - if (!enable || callBackUrls.current.includes(url)) return; + if (!enable || callBackUrls.current.includes(url) || url === currentPath) + return; const performRedirect = () => { if (!isRedirecting.current) {