Repairs to code
This commit is contained in:
parent
ffa951936e
commit
06e7600809
|
@ -56,7 +56,7 @@ function App() {
|
||||||
const [ fetching , setFetching ] = useState( false )
|
const [ fetching , setFetching ] = useState( false )
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
if( data.length === 0 ) {
|
if( data.length === 0 && fetching === false ) {
|
||||||
readData()
|
readData()
|
||||||
setFetching( true )
|
setFetching( true )
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue