From 5610d3402bc00d89eb265d1315d5dd667db840c1 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 25 Sep 2024 20:51:48 +0530 Subject: [PATCH] feat: remove signal --- src/routes/userRoute.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/routes/userRoute.tsx b/src/routes/userRoute.tsx index 93fff684..0400c031 100644 --- a/src/routes/userRoute.tsx +++ b/src/routes/userRoute.tsx @@ -20,9 +20,7 @@ const UserRoute: React.FC = ({ children }) => { const fetchUser = async () => { try { - const { data } = await axios.get('http://localhost:8080/auth/current-user', { - signal: controller.signal - }); + const { data } = await axios.get('http://localhost:8080/auth/current-user'); if (data.ok) { setOk(true); } else { @@ -37,7 +35,6 @@ const UserRoute: React.FC = ({ children }) => { } } finally { setLoading(false); - clearTimeout(timeoutId); } }; @@ -45,7 +42,6 @@ const UserRoute: React.FC = ({ children }) => { return () => { controller.abort(); - clearTimeout(timeoutId); }; }, []);