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)
.then(handleReceiveDataSaub)
.catch(error => console.error(error))
}, [chartInterval]);
}, [id, chartInterval]);
const colSpan = 24 / (paramsGroups.length)

View File

@ -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(<>
<h2>Скважины</h2>