You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 9, 2026. It is now read-only.
It's inefficient that the metrics and sample manifest are reloaded every time the user navigates to those pages - we really should be able to just load them once when the page is loaded.
To fix this, move web/src/utils/fetchMetrics to web/src/context/Metrics.tsx and make it export:
A hook 'useMetrics' that retrieves the metrics (or undefined before they are loaded)
A component MetricsProvider
Similarly, extract the sample manifest reading code from web/src/components/Samples.tsx to web/src/context/SampleManifest.tsx and make it export useSampleManifest() and SampleManifestProvider.
Then use these in App.tsx so that all the pages have access to the context, and modify page components appropriately.