fix. убрал зависимость у эффекта (выдавал warning)

This commit is contained in:
Фролов 2021-05-28 14:33:57 +05:00
parent eb92d5a0d7
commit eee22ee4ff
2 changed files with 3 additions and 3 deletions

View File

@ -230,7 +230,7 @@ export default function TelemetryView(props) {
DataService.getData(id, null, chartInterval) DataService.getData(id, null, chartInterval)
.then(handleReceiveDataSaub) .then(handleReceiveDataSaub)
.catch(error => console.error(error)) .catch(error => console.error(error))
}, [chartInterval]); }, [id, chartInterval]);
const colSpan = 24 / (paramsGroups.length) const colSpan = 24 / (paramsGroups.length)

View File

@ -63,7 +63,7 @@ export default function Wells(props){
const [loader, setLoader] = useState(false) const [loader, setLoader] = useState(false)
const history = useHistory() const history = useHistory()
let updateWellsList = async () => { const updateWellsList = async () => {
setLoader(true) setLoader(true)
try{ try{
let newWells = (await WellService.getWells()).map(w =>{return {key:w.id, ...w}}) let newWells = (await WellService.getWells()).map(w =>{return {key:w.id, ...w}})
@ -78,7 +78,7 @@ export default function Wells(props){
setLoader(false) setLoader(false)
} }
useEffect(()=>{updateWellsList()}, []) useEffect(()=>updateWellsList())
return(<> return(<>
<h2>Скважины</h2> <h2>Скважины</h2>