refactor(FE-363): Rename response variable to purchasePerSupplier

This commit is contained in:
rstubryan
2025-12-13 11:46:00 +07:00
parent 9bc632c286
commit fdb3e0481a
@@ -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 = (