add aboutUs button for garoosi
This commit is contained in:
+3
-3
@@ -136,7 +136,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
}
|
||||
} else {
|
||||
// If no token, handle redirect to login or allow access to login or 404
|
||||
if (['login', '404','educate'].includes(to.name as string)) {
|
||||
if (['login', '404','educate', 'aboutUs'].includes(to.name as string)) {
|
||||
return next() // Allow access to login or 404
|
||||
}
|
||||
goToLogin(to, next) // Redirect to login if no token
|
||||
@@ -153,7 +153,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
return next() // Proceed to the intended route
|
||||
} else {
|
||||
// If no token, ensure proper redirection to login or 404
|
||||
if (['login', '404','educate'].includes(to.name as string)) {
|
||||
if (['login', '404','educate', 'aboutUs'].includes(to.name as string)) {
|
||||
return next() // Allow access to login or 404
|
||||
}
|
||||
return next({ name: 'login' })
|
||||
@@ -164,7 +164,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (getToken() && !hasFingerPrint) {
|
||||
next()
|
||||
} else {
|
||||
if (['login', '404','educate'].includes(to.name as string)) {
|
||||
if (['login', '404','educate', 'aboutUs'].includes(to.name as string)) {
|
||||
if (to.name === 'login'){
|
||||
goToLogin(to, next)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user