From 6d299c1f432985cb4f8c908fcb37f13e0522e739 Mon Sep 17 00:00:00 2001 From: seb Date: Wed, 28 Oct 2026 22:25:58 +0100 Subject: [PATCH] u --- src/App.jsx | 2 +- src/automats/authAutomat.js | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 93e7356..fc91d57 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -4,9 +4,9 @@ import Box from '@mui/material/Box'; import CircularProgress from '@mui/material/CircularProgress'; import authAutomat from './automats/authAutomat'; import LoginPage from './components/LoginPage'; +import AppRouter from './appRouter'; const CompanySetupDialog = lazy(() => import('./components/CompanySetupDialog')); -const AppRouter = lazy(() => import('./appRouter')); const OAuthAuthorizePage = lazy(() => import('./routes/oauth/OAuthAuthorizePage')); const SseMonitor = import.meta.env.DEV ? lazy(() => import('./devtools/SseMonitor')) diff --git a/src/automats/authAutomat.js b/src/automats/authAutomat.js index 8ea8d6c..edf0a9a 100644 --- a/src/automats/authAutomat.js +++ b/src/automats/authAutomat.js @@ -128,17 +128,9 @@ function buildAuthState(user, status, extra = {}) { } function syncSse(state) { - if (state.hasAuth) { - void import('./sseAutomat') - .then(({ default: sseAutomat }) => { - sseAutomat.actions.syncWithAuth?.(state); - }) - .catch(() => { }); - } else { - const sseAutomat = Automat.get('sse'); - if (sseAutomat?.actions?.syncWithAuth) { - sseAutomat.actions.syncWithAuth(state); - } + const sseAutomat = Automat.get('sse'); + if (sseAutomat?.actions?.syncWithAuth) { + sseAutomat.actions.syncWithAuth(state); } }