MCPcopy Index your code
hub / github.com/tinyplex/tinybase / MetricsView

Function MetricsView

src/ui-react-inspector/MetricsView.tsx:20–50  ·  view source on GitHub ↗
({
  metricsId,
  s,
}: {readonly metricsId?: Id} & StoreProp)

Source from the content-addressed store, hash-verified

18);
19
20export const MetricsView = ({
21 metricsId,
22 s,
23}: {readonly metricsId?: Id} & StoreProp) => {
24 const metrics = useMetrics(metricsId);
25 const metricIds = useMetricIds(metrics);
26 return isUndefined(metrics) ? null : (
27 <Details
28 uniqueId={getUniqueId('m', metricsId)}
29 title={'Metrics: ' + (metricsId ?? DEFAULT)}
30 s={s}
31 >
32 {arrayIsEmpty(metricIds) ? (
33 'No metrics defined'
34 ) : (
35 <table>
36 <thead>
37 <th>Metric Id</th>
38 <th>Table Id</th>
39 <th>Metric</th>
40 </thead>
41 <tbody>
42 {arrayMap(metricIds, (metricId) => (
43 <MetricRow metrics={metrics} metricId={metricId} key={metricId} />
44 ))}
45 </tbody>
46 </table>
47 )}
48 </Details>
49 );
50};

Callers

nothing calls this directly

Calls 6

useMetricsFunction · 0.90
useMetricIdsFunction · 0.90
isUndefinedFunction · 0.90
getUniqueIdFunction · 0.90
arrayIsEmptyFunction · 0.90
arrayMapFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…