From fdb3e0481a25747038cd9628764518a03fecc024 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Sat, 13 Dec 2025 11:46:00 +0700 Subject: [PATCH] refactor(FE-363): Rename response variable to purchasePerSupplier --- .../report/logistic-stock/PurchasesPerSupplierTab.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/pages/report/logistic-stock/PurchasesPerSupplierTab.tsx b/src/components/pages/report/logistic-stock/PurchasesPerSupplierTab.tsx index fd6b67d5..d74ec53f 100644 --- a/src/components/pages/report/logistic-stock/PurchasesPerSupplierTab.tsx +++ b/src/components/pages/report/logistic-stock/PurchasesPerSupplierTab.tsx @@ -157,13 +157,15 @@ const PurchasesPerSupplierTab = () => { }, [updateFilter]); // ===== DATA FETCHING ===== - const { data: response, isLoading } = useSWR( + const { data: purchasePerSupplier, isLoading } = useSWR( `${LogisticService.basePath}/purchase-supplier${getTableFilterQueryString()}`, LogisticService.getAllFetcher ); - const data: LogisticPurchasePerSupplier[] = isResponseSuccess(response) - ? (response?.data as unknown as LogisticPurchasePerSupplier[]) + const data: LogisticPurchasePerSupplier[] = isResponseSuccess( + purchasePerSupplier + ) + ? (purchasePerSupplier?.data as unknown as LogisticPurchasePerSupplier[]) : []; const getTableColumns = (