From f8cac83ea4a83f224c3e80ea14c276ca80adc283 Mon Sep 17 00:00:00 2001 From: Matheus Augusto Date: Thu, 8 Feb 2024 14:32:38 -0300 Subject: [PATCH 1/3] fix: change router.push to navigateTo after refreshSession() --- apps/app/pages/sign-in.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/app/pages/sign-in.vue b/apps/app/pages/sign-in.vue index 115c2e8..a2895be 100644 --- a/apps/app/pages/sign-in.vue +++ b/apps/app/pages/sign-in.vue @@ -6,7 +6,6 @@ useSeoMeta({ title: "Entre agora", }); -const router = useRouter(); const signInStore = useSignInStore(); const email = ref(null); const password = ref(null); @@ -32,7 +31,9 @@ async function signIn() { password: password.value, }); await sessionStore.refreshSession(); - router.push("/"); + return await navigateTo("/", { + external: true, + }); } catch (e) { toast?.error("Email ou senha incorretos."); } finally { From 905fb4e2a83fb006b6ad37d04b0a2cb1fc8075c2 Mon Sep 17 00:00:00 2001 From: Matheus Augusto Date: Thu, 15 Feb 2024 10:19:05 -0300 Subject: [PATCH 2/3] fix: hotfix after signout --- apps/app/pages/sign-in.vue | 5 ++--- apps/app/pages/sign-out.vue | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/app/pages/sign-in.vue b/apps/app/pages/sign-in.vue index a2895be..115c2e8 100644 --- a/apps/app/pages/sign-in.vue +++ b/apps/app/pages/sign-in.vue @@ -6,6 +6,7 @@ useSeoMeta({ title: "Entre agora", }); +const router = useRouter(); const signInStore = useSignInStore(); const email = ref(null); const password = ref(null); @@ -31,9 +32,7 @@ async function signIn() { password: password.value, }); await sessionStore.refreshSession(); - return await navigateTo("/", { - external: true, - }); + router.push("/"); } catch (e) { toast?.error("Email ou senha incorretos."); } finally { diff --git a/apps/app/pages/sign-out.vue b/apps/app/pages/sign-out.vue index a7fc25d..0258346 100644 --- a/apps/app/pages/sign-out.vue +++ b/apps/app/pages/sign-out.vue @@ -1,9 +1,11 @@ From d466a3b2b45035832c34fbbe7d26022d05666524 Mon Sep 17 00:00:00 2001 From: Matheus Augusto Date: Thu, 15 Feb 2024 10:29:47 -0300 Subject: [PATCH 3/3] fix: remove router in sign-out.vue --- apps/app/pages/sign-out.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/app/pages/sign-out.vue b/apps/app/pages/sign-out.vue index 0258346..6e9e636 100644 --- a/apps/app/pages/sign-out.vue +++ b/apps/app/pages/sign-out.vue @@ -1,5 +1,4 @@