Skip to content

Commit 698cff2

Browse files
committed
Only wait charts if stats is not loaded yet
1 parent f1f1e3b commit 698cff2

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/supportedChainsTable.tsx

+10-9
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,6 @@ const Table = () => {
193193
</div>
194194
);
195195
}
196-
if (!stats) {
197-
return (
198-
<div style={{ margin: "8rem" }}>
199-
<LoadingOverlay message="Loading Sourcify stats" />
200-
</div>
201-
);
202-
}
203196

204197
const testRunCircleURL =
205198
testReportObject &&
@@ -251,8 +244,16 @@ const Table = () => {
251244
)}
252245
<ReactTooltip effect="solid" />
253246
<div>
254-
<h2>Chains by Verified Contracts</h2>
255-
<Chart stats={stats} sourcifyChainMap={sourcifyChainMap} sourcifyChains={sourcifyChains} />
247+
{stats ? (
248+
<>
249+
<h2>Chains by Verified Contracts</h2>
250+
<Chart stats={stats} sourcifyChainMap={sourcifyChainMap} sourcifyChains={sourcifyChains} />
251+
</>
252+
) : (
253+
<div style={{ margin: "8rem" }}>
254+
<LoadingOverlay message="Loading Sourcify stats" />
255+
</div>
256+
)}
256257
</div>
257258
<div>
258259
<h2>Chains by Type of Support</h2>

0 commit comments

Comments
 (0)