feat: stabilize admin dashboard, refactor group management, implement PWA, and fix routing
This commit is contained in:
+8
-1
@@ -33,7 +33,7 @@ definePageMeta({
|
||||
layout: 'default'
|
||||
})
|
||||
|
||||
const { googleSignIn, initAuth } = useAuth()
|
||||
const { googleSignIn, initAuth, isAuthenticated } = useAuth()
|
||||
const loading = ref(false)
|
||||
|
||||
const signInWithGoogle = async () => {
|
||||
@@ -49,6 +49,13 @@ const signInWithGoogle = async () => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (isAuthenticated.value) {
|
||||
navigateTo('/')
|
||||
}
|
||||
initAuth()
|
||||
})
|
||||
|
||||
watch(isAuthenticated, (val) => {
|
||||
if (val) navigateTo('/')
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user