Use cookie to redirect to last route after oauth

This commit is contained in:
2023-12-10 23:04:26 +01:00
parent 7fe980e478
commit d72d89e10a
3 changed files with 10 additions and 5 deletions

View File

@@ -1,6 +1,11 @@
<script setup lang="ts">
const appConfig = useAppConfig()
const getColor = computed(() => appConfig.ui.primary)
const router = useRouter()
router.afterEach((route) => {
useCookie('last-route', { path: '/', default: () => '/' }).value = route.fullPath
})
</script>
<template>