refactor: alte lokale States und ungenutzte Funktionen entfernt
- lineStatusData und setLinesData entfernt (durch Redux ersetzt) - doppeltes fetchGisStationsMeasurementsThunk entfernt - Kommentar-Altlasten bereinigt - Vorbereitung für künftige Migration von lineColors zu Redux
This commit is contained in:
@@ -142,10 +142,9 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const [sonstigeMarkers, setSonstigeMarkers] = useState([]);
|
||||
const [tkComponentsMarkers, setTkComponentsMarkers] = useState([]);
|
||||
//--------------------------------------------
|
||||
const [lineStatusData, setLineStatusData] = useState([]);
|
||||
|
||||
const [linePositions, setLinePositions] = useState([]);
|
||||
const { lineColors, tooltipContents } = useLineData(webserviceGisLinesStatusUrl, setLineStatusData);
|
||||
const { lineColors, tooltipContents } = useLineData(webserviceGisLinesStatusUrl);
|
||||
const [polylines, setPolylines] = useState([]);
|
||||
const [markers, setMarkers] = useState([]);
|
||||
const [newPoint, setNewPoint] = useState(null);
|
||||
@@ -784,7 +783,6 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
);
|
||||
}
|
||||
}, [map, menuItemAdded]);
|
||||
//--------------------------------------------
|
||||
|
||||
//--------------------------------------------
|
||||
// Beim ersten Client-Render den Wert aus localStorage laden
|
||||
@@ -793,11 +791,6 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
dispatch(setPolylineVisible(storedPolylineVisible));
|
||||
}, [dispatch]);
|
||||
//--------------------------------------------
|
||||
useEffect(() => {
|
||||
if (statusMeasurements === "idle") {
|
||||
dispatch(fetchGisStationsMeasurementsThunk());
|
||||
}
|
||||
}, [statusMeasurements, dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (statusSystem === "idle") {
|
||||
@@ -824,8 +817,10 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
}
|
||||
}, [statusStaticDistrict, dispatch]);
|
||||
useEffect(() => {
|
||||
dispatch(fetchGisStationsMeasurementsThunk());
|
||||
}, [dispatch]);
|
||||
if (statusMeasurements === "idle") {
|
||||
dispatch(fetchGisStationsMeasurementsThunk());
|
||||
}
|
||||
}, [statusMeasurements, dispatch]);
|
||||
useEffect(() => {
|
||||
dispatch(fetchGisSystemStaticThunk());
|
||||
}, [dispatch]);
|
||||
|
||||
Reference in New Issue
Block a user