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