| useEffect(() => { | useEffect(() => { | ||||
| getAllScrappes().then(res => setScrappes(res.data)) | getAllScrappes().then(res => setScrappes(res.data)) | ||||
| setInterval(() => { | |||||
| const interval = setInterval(() => { | |||||
| getAllScrappes().then(res => setScrappes(res.data)) | getAllScrappes().then(res => setScrappes(res.data)) | ||||
| }, 10000); | }, 10000); | ||||
| return () => clearInterval() | |||||
| return () => clearInterval(interval) | |||||
| }, []) | }, []) | ||||