1404/11/18-delete required rule in referral code &

hidden home page
This commit is contained in:
2026-02-07 14:02:29 +03:30
parent 2ffcee9f3a
commit e630c07d92
5 changed files with 76 additions and 10 deletions
+3 -3
View File
@@ -73,8 +73,8 @@ function goToLogin(to: RouteLocationNormalized, next: NavigationGuardNext) {
}
function goToHome(to: RouteLocationNormalized, next: NavigationGuardNext) {
if (to.name !== 'home') {
return next({ name: 'home' }) // Redirect to login
if (to.name !== 'buyProduct') {
return next({ name: 'buyProduct' }) // Redirect to login
} else {
return next() // If already on the login page, don't redirect
}
@@ -151,7 +151,7 @@ router.beforeEach(async (to, from, next) => {
if (fingerPosition) {
if (getToken()) {
if (to.name === 'login') {
return next({ name: from.name || 'home' }) // Redirect to home if trying to access login after authentication
return next({ name: from.name || 'buyProduct' }) // Redirect to home if trying to access login after authentication
}
return next() // Proceed to the intended route
} else {