From 7a6136ab997757f44cbdbc7512d53d7a3f4b8873 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Fri, 25 Jul 2025 16:20:10 +0800 Subject: [PATCH] fix router push in google util --- open-isle-cli/src/utils/google.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/open-isle-cli/src/utils/google.js b/open-isle-cli/src/utils/google.js index 45c92689e..d7d529bf0 100644 --- a/open-isle-cli/src/utils/google.js +++ b/open-isle-cli/src/utils/google.js @@ -51,10 +51,15 @@ export async function googleSignIn(redirect_success, redirect_not_approved) { } } +import router from '../router' + export function loginWithGoogle() { - googleSignIn(() => { - this.$router.push('/') - }, (token) => { - this.$router.push('/signup-reason?token=' + token) - }) + googleSignIn( + () => { + router.push('/') + }, + token => { + router.push('/signup-reason?token=' + token) + } + ) } \ No newline at end of file