Skip to content

Commit

Permalink
No double call of setState() needed
Browse files Browse the repository at this point in the history
  • Loading branch information
lupusA committed Sep 14, 2023
1 parent 29f783d commit eb5e01c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/SourcesTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export class SourcesTable extends Component {

componentDidMount() {
const { defaultSnapshotViewAll } = this.context;
this.setState({ isLoading: true });
this.setState({ selectedOwner: defaultSnapshotViewAll ? allSnapshots : localSnapshots });
this.setState({ isLoading: true, selectedOwner: defaultSnapshotViewAll ? allSnapshots : localSnapshots });
this.fetchSourcesWithoutSpinner();
this.interval = window.setInterval(this.fetchSourcesWithoutSpinner, 3000);
}
Expand Down

0 comments on commit eb5e01c

Please sign in to comment.