This commit is contained in:
seb
2026-10-28 22:25:58 +01:00
parent 87ef79bea3
commit 6d299c1f43
2 changed files with 4 additions and 12 deletions

View File

@@ -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'))

View File

@@ -128,19 +128,11 @@ 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);
}
}
}
function applySession(nextSession) {
const googleClientId =