What happened
Continuous rerendering of components using the frontend/src/wrapper files(almost all)
We compare arrays which can never be true( []!=[])

The code targeted:
const [isAuthenticated, fetchUserAccess] = useAuthStore(
React.useCallback(
(state) => [state.isAuthenticated(), state.service.fetchUserAccess],
[],
),
to
const isAuthenticated = useAuthStore(
React.useCallback((state) => state.isAuthenticated, []),
);
const fetchUserAccess = useAuthStore(
React.useCallback((state) => state.service.fetchUserAccess, []),
);
needs to be changed similarly in frontend/src/wrappers/Authguard.jsx , frontend/src/wrappers/withAuth.jsx and frontend/src/wrappers/IfAuthRedirected.jsx
Environment
- OS:All
- IntelOwl version: latest
What did you expect to happen
Should rerender only when logout or smtg like that
How to reproduce your issue
kept a console.count to demonstrate
Error messages and logs
Before:

After:

What happened
Continuous rerendering of components using the frontend/src/wrapper files(almost all)

We compare arrays which can never be true( []!=[])
The code targeted:
const [isAuthenticated, fetchUserAccess] = useAuthStore(
React.useCallback(
(state) => [state.isAuthenticated(), state.service.fetchUserAccess],
[],
),
to
const isAuthenticated = useAuthStore(
React.useCallback((state) => state.isAuthenticated, []),
);
const fetchUserAccess = useAuthStore(
React.useCallback((state) => state.service.fetchUserAccess, []),
);
needs to be changed similarly in frontend/src/wrappers/Authguard.jsx , frontend/src/wrappers/withAuth.jsx and frontend/src/wrappers/IfAuthRedirected.jsx
Environment
What did you expect to happen
Should rerender only when logout or smtg like that
How to reproduce your issue
kept a console.count to demonstrate
Error messages and logs
Before: