fix: bugs
Deploy banu-front / deploy (push) Successful in 1m47s

This commit is contained in:
sajjadtalkhabi
2026-08-18 09:08:45 +03:30
parent e4a0eb463b
commit 81332abdb0
2 changed files with 2 additions and 8 deletions
+1 -6
View File
@@ -1,7 +1,6 @@
import { ROLE_HOME_ROUTES } from '@/enums'
import { useAuthStore } from '@/store/auth'
import { MAIN_SITE_URL, ROLE_HOME_ROUTES } from '@/enums'
import { tokenService } from '@/services/api/token-service'
import { shouldLandOnMainSite } from '@/features/auth/composables/useRedirectAfterLogin'
const APP_TITLE = 'مدرسه بانو'
@@ -20,10 +19,6 @@ export const guestGuard = (to) => {
if (!to.meta?.requiresGuest) return
if (tokenService.hasToken()) {
const auth = useAuthStore()
if (shouldLandOnMainSite(auth)) {
window.location.href = MAIN_SITE_URL
return false
}
return { name: ROLE_HOME_ROUTES[auth.role] || 'student-dashboard' }
}
return