🚑 Fix login not redirect to home page

This commit is contained in:
SebClem 2022-06-12 18:12:12 +02:00
parent d90a34435f
commit 8c14b9fde5
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
2 changed files with 7 additions and 3 deletions

View File

@ -19,7 +19,7 @@
<v-btn
icon="mdi-exit-to-app"
class="text-high-emphasis text-white"
v-on:click="logout(false, false)"
v-on:click="logoutAndRedirect()"
></v-btn>
</v-list-item-avatar>
</template>
@ -44,6 +44,11 @@ function getAvatar() {
const avatarBaseUrl = import.meta.env.VITE_DISCORD_USER_AVATAR_URL;
return avatarBaseUrl + userStore.discordId + "/" + avatar.value + ".png";
}
function logoutAndRedirect() {
logout(false, false);
window.location.assign("/");
}
</script>
<style scoped></style>

View File

@ -12,8 +12,7 @@
</template>
<script setup lang="ts">
const test = import.meta.env.VITE_OAUTH_REDIRECT_URL;
window.location.href = import.meta.env.VITE_OAUTH_REDIRECT_URL;
window.location.assign(import.meta.env.VITE_OAUTH_REDIRECT_URL);
</script>
<style scoped></style>