瀏覽代碼

🐛 fix(redemptions-table): show loading indicator while refetching data

Previously, the table did not enter the loading state after performing actions such as deleting, enabling, or disabling a redemption code. This caused a brief period where the UI appeared unresponsive while awaiting the backend response.

Changes made:
• Added `setLoading(true)` at the beginning of `loadRedemptions` to activate the loading spinner whenever data is (re)fetched.
• Added an explanatory code comment to clarify the intent.

This improves user experience by clearly indicating that the system is processing and prevents confusion during data refresh operations.
t0ng7u 8 月之前
父節點
當前提交
25e17b95d5
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      web/src/components/table/RedemptionsTable.js

+ 1 - 0
web/src/components/table/RedemptionsTable.js

@@ -300,6 +300,7 @@ const RedemptionsTable = () => {
   };
 
   const loadRedemptions = async (startIdx, pageSize) => {
+    setLoading(true);
     const res = await API.get(
       `/api/redemption/?p=${startIdx}&page_size=${pageSize}`,
     );