u
This commit is contained in:
@@ -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'))
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user