);
}
// For error status, we still render the score data (cached from the previous
// successful run) rather than blanking the card with "Error calculating score".
// A small watermark under the timestamp tells the user it's stale.
const showAsError = score.status === 'error' && score.score === 0 && !score.summary;
// Pure error with no cached data to fall back on
if (showAsError) {
return (
{title} Health
{onRefresh && (
}
loading={isRefreshing} onClick={onRefresh}>Retry
)}
{icon}