Files
leocrm/frontend/src/main.tsx
T

27 lines
720 B
TypeScript
Raw Normal View History

import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import './index.css';
import './i18n';
// Unregister any existing PWA service workers (PWA disabled — was caching stale assets)
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then((registrations) => {
for (const reg of registrations) {
reg.unregister();
}
});
}
// Expose auth store globally in dev mode for E2E test access
import { useAuthStore } from './store/authStore';
if (import.meta.env.DEV) {
(window as any).__AUTH_STORE__ = useAuthStore;
}
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>
);