Refactor code structure and remove redundant sections for improved readability and maintainability
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 1m48s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 1m48s
This commit is contained in:
@@ -12,7 +12,6 @@ vi.mock('@/stores/auth', () => ({
|
||||
isAuthReady: isAuthReadyMock,
|
||||
isUserLoggedIn: isUserLoggedInMock,
|
||||
isParentAuthenticated: isParentAuthenticatedMock,
|
||||
logoutParent: vi.fn(),
|
||||
enforceParentExpiry: vi.fn(),
|
||||
}))
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import {
|
||||
isUserLoggedIn,
|
||||
isParentAuthenticated,
|
||||
isAuthReady,
|
||||
logoutParent,
|
||||
enforceParentExpiry,
|
||||
} from '../stores/auth'
|
||||
import ParentPinSetup from '@/components/auth/ParentPinSetup.vue'
|
||||
@@ -304,8 +303,6 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (isParentAuthenticated.value) {
|
||||
return next('/parent')
|
||||
} else {
|
||||
// Ensure parent auth is fully cleared when redirecting away from /parent
|
||||
logoutParent()
|
||||
return next('/child')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user