Merge pull request #117 from ArtemKolodko/improve_load_events

Improve loadEvents with single useEffect
pull/120/head
Artem 3 years ago committed by GitHub
commit 3bc3acb15c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/pages/AddressPage/tabs/events/Events.tsx

@ -226,7 +226,7 @@ export function EventsTab(props: {
const logsWithSignatures = logs.map((l, i: number) => ({
...l,
input: l.input || 'n/a',
input: l.input || '',
timestamp: l.timestamp || '',
primaryKey: `${l.address}_${i}`, // key for grommet DataTable
signatures: logsSignatures[i],
@ -243,11 +243,7 @@ export function EventsTab(props: {
useEffect(() => {
loadEvents()
}, [props.id])
useEffect(() => {
loadEvents()
}, [filter.offset])
}, [props.id, filter.offset])
if(isInitialLoading) {
return <CenteredContainer>

Loading…
Cancel
Save