reformat with new prettier config
parent
78bb54368f
commit
852111d8c1
@ -1,9 +1,9 @@
|
|||||||
export default defineNuxtRouteMiddleware((to, from) => {
|
export default defineNuxtRouteMiddleware((to, from) => {
|
||||||
const user = useSupabaseUser();
|
const user = useSupabaseUser()
|
||||||
|
|
||||||
if (!user.value && to.path.startsWith('/notes')) {
|
if (!user.value && to.path.startsWith('/notes')) {
|
||||||
return navigateTo('/login');
|
return navigateTo('/login')
|
||||||
} else if (user.value && to.path === '/login') {
|
} else if (user.value && to.path === '/login') {
|
||||||
return navigateTo('/notes');
|
return navigateTo('/notes')
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue