feat: demo page realisation

This commit is contained in:
2026-04-24 13:17:27 +03:00
parent b42802aac0
commit d67df0c2e1
167 changed files with 18271 additions and 65 deletions

View File

@@ -0,0 +1,26 @@
import React, { useEffect } from "react";
import { useParams } from "react-router-dom";
import { apiStore } from "../../../client/src/api/ApiStore/store";
import App from "../../../client/src/App";
import "../../../client/src/index.css";
import "../../../client/src/App.css";
export const DemoPage = () => {
const { id } = useParams<{ id: string }>();
// Устанавливаем routeId синхронно при рендере,
// чтобы App уже имел его при монтировании
if (id && apiStore.routeId !== id) {
apiStore.setRouteId(id);
}
useEffect(() => {
return () => {
apiStore.stopPositionSimulation();
};
}, []);
if (!id) return null;
return <App />;
};