add aboutUs button for garoosi

This commit is contained in:
2026-02-26 14:06:06 +03:30
parent e4669bd172
commit 4a3ea232b5
7 changed files with 105 additions and 6 deletions
+3 -3
View File
@@ -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