Improve loadEvents with single useEffect

pull/117/head
artemkolodko 3 years ago
parent 7089ea8a26
commit c185822d10
  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