From 8ea8375414fa19b3ebcf544bc8dbb0c819f047d0 Mon Sep 17 00:00:00 2001 From: Andreas Ellewsen <andreas@ellewsen.no> Date: Mon, 25 Jul 2022 12:46:42 +0200 Subject: [PATCH] Fix bug in user info fetching on invite page The intention of the setup is to trigger a new call to userinfo after an invite has been used to start a session in the backend. This is done by checking a state value. Due to an oversight we did not watch the state value itself, but instead the function used to updated it, which obviously does not change. Resolves: GREG-276 --- frontend/src/routes/invite/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/routes/invite/index.tsx b/frontend/src/routes/invite/index.tsx index 2b3f17b4..9acf2579 100644 --- a/frontend/src/routes/invite/index.tsx +++ b/frontend/src/routes/invite/index.tsx @@ -105,7 +105,7 @@ function Invite() { // observed where the userinfo endpoint is called too fast // and no invite_id is found in the server-side session setTimeout(fetchUserInfo, 100) - }, [setTokenOk]) + }, [tokenOk]) if (user.auth) { return <ChooseRegistrationMethod /> -- GitLab