fix(ui): R3 review — give the Stats API-usage block its own loading/error state
The 'usage' query rendered both its loading and its error state as 'No usage' (the same false-empty R3 targets), while the sibling 'status' query got a proper state. Split the fallback into error(+retry) / loading / empty.
This commit is contained in:
@@ -155,6 +155,12 @@ function Overview({ me }: { me: Me }) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
) : usage.isError ? (
|
||||||
|
<StateMessage tone="error" onRetry={() => usage.refetch()}>
|
||||||
|
{t("common.loadError")}
|
||||||
|
</StateMessage>
|
||||||
|
) : usage.isLoading ? (
|
||||||
|
<LoadingState label={t("stats.sync.loading")} />
|
||||||
) : (
|
) : (
|
||||||
<div className="text-muted text-sm">{t("stats.sync.noUsage")}</div>
|
<div className="text-muted text-sm">{t("stats.sync.noUsage")}</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user