feat: add role user modules and shared table updates
This commit is contained in:
@@ -20,23 +20,16 @@ export default function AppInitializer({ children }: { children: ReactNode }) {
|
||||
|
||||
const initialize = async () => {
|
||||
if (!accessToken || user) {
|
||||
console.debug('[auth] app-init:skip', {
|
||||
hasToken: !!accessToken,
|
||||
hasUser: !!user,
|
||||
});
|
||||
setLoaded();
|
||||
return;
|
||||
}
|
||||
|
||||
setLoading();
|
||||
console.debug('[auth] app-init:start');
|
||||
|
||||
try {
|
||||
await initializeAuthenticatedApp();
|
||||
console.debug('[auth] app-init:success');
|
||||
} catch {
|
||||
if (isActive) {
|
||||
console.debug('[auth] app-init:failed, logging out');
|
||||
logout();
|
||||
clearApp();
|
||||
setLoadError();
|
||||
|
||||
Reference in New Issue
Block a user