diff --git a/src/pages/TelemetryView.jsx b/src/pages/TelemetryView.jsx index 96e6890..6b10633 100644 --- a/src/pages/TelemetryView.jsx +++ b/src/pages/TelemetryView.jsx @@ -230,7 +230,7 @@ export default function TelemetryView(props) { DataService.getData(id, null, chartInterval) .then(handleReceiveDataSaub) .catch(error => console.error(error)) - }, [chartInterval]); + }, [id, chartInterval]); const colSpan = 24 / (paramsGroups.length) diff --git a/src/pages/Wells.jsx b/src/pages/Wells.jsx index 84f69cb..6ffef25 100644 --- a/src/pages/Wells.jsx +++ b/src/pages/Wells.jsx @@ -63,7 +63,7 @@ export default function Wells(props){ const [loader, setLoader] = useState(false) const history = useHistory() - let updateWellsList = async () => { + const updateWellsList = async () => { setLoader(true) try{ let newWells = (await WellService.getWells()).map(w =>{return {key:w.id, ...w}}) @@ -78,7 +78,7 @@ export default function Wells(props){ setLoader(false) } - useEffect(()=>{updateWellsList()}, []) + useEffect(()=>updateWellsList()) return(<>

Скважины