This commit is contained in:
@@ -37,6 +37,14 @@ export default defineRouter(function (/* { store, ssrContext } */) {
|
||||
const authStore = useAuthStore()
|
||||
const projectsStore = useProjectsStore()
|
||||
|
||||
if (to.name === '404' || to.name === 'terms' || to.name === 'privacy' || to.name === 'consent') return true
|
||||
|
||||
if (to.name === 'login') return true
|
||||
|
||||
if (to.name === 'agreements' && authStore.isAuth) return true
|
||||
|
||||
// if (!authStore.isTermsAccepted && authStore.isAuth) return { name: 'agreements' }
|
||||
|
||||
if (to.meta.guestOnly && authStore.isAuth) {
|
||||
return { name: 'projects' }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user