import React from "react"; import ReactDOM from "react-dom/client"; import "@/shared/api/interceptors"; import "./index.css"; import App from "./App"; //import AuthInitializer from "./core/authentication/AuthInitializer/AuthInitializer"; import AuthInitializer from "./core/authentication/authInitializer/AuthInitializer"; import { initServiceWorker } from "@/shared/realtime/browserNotifications"; import { watchLoggedOut } from "@/core/authentication/store/loggedOut"; import { useAuthStore } from "@/core/authentication/store/auth.store"; import { useUserStore } from "@/core/authentication/store/user.store"; // Service worker for browser notifications (no permission prompt here) void initServiceWorker(); // Logout means logout: Back / Forward and other tabs can't show the old session watchLoggedOut(() => { useAuthStore.getState().clearAuth(); useUserStore.getState().clearUserInfo(); }); ReactDOM.createRoot(document.getElementById("root")!).render( );