From c2ee2f5b02e7b3d18221a3151bb8ae92b9f92e92 Mon Sep 17 00:00:00 2001 From: dm1sh Date: Wed, 17 May 2023 11:40:20 +0300 Subject: [PATCH] fixed navigation effect dependancy --- front/src/components/WithToken.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/components/WithToken.jsx b/front/src/components/WithToken.jsx index d136f9e..258f072 100644 --- a/front/src/components/WithToken.jsx +++ b/front/src/components/WithToken.jsx @@ -9,7 +9,7 @@ function WithToken({ children }) { if (!getToken()) { return navigate("/login") } - }, []) + }, [navigate]) return ( <>{children}