generated from pascalmartineau/wp-skeleton
refactor: useAuth / useAuthActions
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m4s
All checks were successful
Deploy WordPress and Nuxt / deploy (push) Successful in 1m4s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export default defineNuxtRouteMiddleware((to) => {
|
||||
const { loggedIn } = useUserSession();
|
||||
if (loggedIn.value) {
|
||||
const { isLoggedIn } = useAuth();
|
||||
if (isLoggedIn.value) {
|
||||
return navigateTo(`/connexion?redirect=${encodeURIComponent(to.fullPath)}`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user