From ccb011fba10dcdbd43e62a996e3858a22d2893cc Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 3 Nov 2025 23:13:30 +0800 Subject: [PATCH] fix(usage): ensure refresh button shows loading animation on click Changed from isLoading to isFetching to properly track all query states. Previously, the refresh button spinner would not animate when clicking refresh because isLoading only indicates initial load without cached data. isFetching covers all query states including manual refetches. --- src/components/UsageFooter.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UsageFooter.tsx b/src/components/UsageFooter.tsx index f420d60..654f16c 100644 --- a/src/components/UsageFooter.tsx +++ b/src/components/UsageFooter.tsx @@ -19,7 +19,7 @@ const UsageFooter: React.FC = ({ const { t } = useTranslation(); const { data: usage, - isLoading: loading, + isFetching: loading, refetch, } = useUsageQuery(providerId, appId, usageEnabled);