🐛 Bug fixes and optimization

This commit is contained in:
2024-08-13 18:26:36 +08:00
parent 223f97038c
commit baf529e838
8 changed files with 63 additions and 21 deletions

View File

@ -1,7 +1,7 @@
export default defineNuxtRouteMiddleware((to, from) => {
const id = useUserinfo();
const state = useLoggedInState()
if (!id.isLoggedIn) {
if (!state.value) {
return navigateTo(`/auth/sign-in?redirect_uri=${to.fullPath}`)
}
})