From c879ed72bb2eab0f8bae3eb7a515437d16ece0b0 Mon Sep 17 00:00:00 2001 From: Louis Mazin Date: Mon, 21 Sep 2026 13:39:27 +0200 Subject: [PATCH] test --- frontend/src/pages/AdminUsersPage.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/AdminUsersPage.jsx b/frontend/src/pages/AdminUsersPage.jsx index 48ffa2c..aca1b3c 100644 --- a/frontend/src/pages/AdminUsersPage.jsx +++ b/frontend/src/pages/AdminUsersPage.jsx @@ -37,6 +37,12 @@ const AdminUsersPage = () => { is_superuser: false, }); + useEffect(() => { + if (!currentUser) { + window.location.href = '/login'; + } + }, [currentUser]); + const generateInviteLink = async () => { try { setError(''); @@ -102,7 +108,6 @@ const AdminUsersPage = () => { if (String(userId) === String(getUserId(currentUser))) { logout(); - window.location.href = '/login'; return; }