import React, { useEffect } from "react"; import "./App.css"; import { useAppSelector } from "./store/hooks"; import { createHashRouter, RouterProvider } from "react-router-dom"; import ErrorPage from "./page/ErrorPage"; import { MyObservable } from "./context/MyObservable"; import { Observable } from "@babylonjs/core"; import { selectGlassStatus } from "./store/ProductionMonitoringEntity"; import LDPage from "./page/LDPage"; import LinePageOneOne from "./page/LinePage1-1"; import LinePageOneTwo from "./page/LinePage1-2"; import LinePageTwoOne from "./page/LinePage2-1"; import LinePageTwoTwo from "./page/LinePage2-2"; import LinePageThreeOne from "./page/LinePage3-1"; import LinePageThreeTwo from "./page/LinePage3-2"; import LinePageFourOne from "./page/LinePage4-1"; import LinePageFourTwo from "./page/LinePage4-2"; import LinePageFiveOne from "./page/LinePage5-1"; import LinePageFiveTwo from "./page/LinePage5-2"; const onGlassObservable = new Observable(); function App() { const thisLineGlassStatus = useAppSelector(selectGlassStatus); onGlassObservable.notifyObservers(thisLineGlassStatus); const router = createHashRouter([ { path: "/LD", element: , errorElement: , }, { path: "/LP/1-1", element: , errorElement: , }, { path: "/LP/1-2", element: , errorElement: , }, { path: "/LP/2-1", element: , errorElement: , }, { path: "/LP/2-2", element: , errorElement: , }, { path: "/LP/3-1", element: , errorElement: , }, { path: "/LP/3-2", element: , errorElement: , }, { path: "/LP/4-1", element: , errorElement: , }, { path: "/LP/4-2", element: , errorElement: , }, { path: "/LP/5-1", element: , errorElement: , }, { path: "/LP/5-2", element: , errorElement: , }, ]); useEffect(() => { const timerId = setInterval(() => { window.location.reload(); }, 43200000); return () => { clearInterval(timerId); }; }, []); return (
); } export default App;