import { observer } from "mobx-react-lite"; import { testingModeStore, authStore } from "@shared"; import { useEffect } from "react"; export const TestingModeBanner = observer(() => { const { isAuthenticated } = authStore; useEffect(() => { if (!isAuthenticated) { testingModeStore.stopPolling(); return; } testingModeStore.startPolling(); return () => { testingModeStore.stopPolling(); }; }, [isAuthenticated]); if (!testingModeStore.isEnabled) return null; return (
ПРОВОДИТСЯ ТЕСТИРОВАНИЕ. ПРОСЬБА НЕ ВЗАИМОДЕЙСТВОВАТЬ С ПАНЕЛЬЮ АДМИНИСТРИРОВАНИЯ
); });