Skip to content

Commit

Permalink
fix: remove the root cause of multiple rerenders on editor lifecycle (#…
Browse files Browse the repository at this point in the history
…857)

Cause of multiple rerendering on page load
  • Loading branch information
Kevin101Zhang authored Jul 9, 2024
1 parent 680c6c9 commit 889fba0
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions frontend/widgets/src/QueryApi.Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,6 @@ State.init({
selected_account: undefined,
});

Near.asyncView(`${REPL_REGISTRY_CONTRACT_ID}`, "list_all").then((data) => {
const indexers = [];
const total_indexers = 0;
Object.keys(data).forEach((accountId) => {
Object.keys(data[accountId]).forEach((functionName) => {
indexers.push({
accountId: accountId,
indexerName: functionName,
});
total_indexers += 1;
});
});

let my_indexers = indexers.filter(
(indexer) => indexer.accountId === accountId
);

State.update({
my_indexers: my_indexers,
all_indexers: indexers,
totalIndexers: total_indexers,
});
});

const Subheading = styled.h2`
display: block;
margin: 0;
Expand Down

0 comments on commit 889fba0

Please sign in to comment.