MCPcopy Create free account
hub / github.com/Noumena-Network/code / Stats

Function Stats

src/components/Stats.tsx:83–112  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

81 });
82}
83export function Stats(t0) {
84 const $ = _c(4);
85 const {
86 onClose
87 } = t0;
88 let t1;
89 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
90 t1 = createAllTimeStatsPromise();
91 $[0] = t1;
92 } else {
93 t1 = $[0];
94 }
95 const allTimePromise = t1;
96 let t2;
97 if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
98 t2 = <Box marginTop={1}><Spinner /><Text> Loading your Code stats…</Text></Box>;
99 $[1] = t2;
100 } else {
101 t2 = $[1];
102 }
103 let t3;
104 if ($[2] !== onClose) {
105 t3 = <Suspense fallback={t2}><StatsContent allTimePromise={allTimePromise} onClose={onClose} /></Suspense>;
106 $[2] = onClose;
107 $[3] = t3;
108 } else {
109 t3 = $[3];
110 }
111 return t3;
112}
113type StatsContentProps = {
114 allTimePromise: Promise<StatsResult>;
115 onClose: Props['onClose'];

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected