From adc61a92348a3d7093fbe9bab948af13e8ea752c Mon Sep 17 00:00:00 2001 From: setop Date: Tue, 9 Apr 2024 22:09:37 +0200 Subject: [PATCH] fix(front): navbar not updated after login [workaround] --- src/views/User/LoginView.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/views/User/LoginView.vue b/src/views/User/LoginView.vue index e41641dca..2dd93d157 100644 --- a/src/views/User/LoginView.vue +++ b/src/views/User/LoginView.vue @@ -245,8 +245,17 @@ const { onDone: onCurrentUserMutationDone, mutate: updateCurrentUserMutation } = onCurrentUserMutationDone(async () => { console.debug("Current user mutation done, now setuping actors…"); + // since we fail to refresh the navbar properly, we force a page reload. + // see the explanation of the bug bellow + window.location = redirect.value || "/"; try { + /* FIXME this promise never resolved the first time + no idea why ! + this appends even with the last version of apollo-composable (4.0.2) + may be related to that : https://github.com/vuejs/apollo/issues/1543 + */ const result = await loadIdentities(); + console.debug("login, loadIdentities resolved"); if (!result) return; await initializeCurrentActor(result.loggedUser.actors); } catch (err: any) {