refactor(FE-357): Use hppPerKandangExport instead of fetchAllExportData

This commit is contained in:
rstubryan
2025-12-17 14:54:28 +07:00
parent 80fd75dfc1
commit 6155929e14
@@ -411,7 +411,7 @@ const HppPerKandangTab = () => {
setIsExcelExportLoading(false); setIsExcelExportLoading(false);
} }
}, [ }, [
fetchAllExportData, hppPerKandangExport,
tableFilterState, tableFilterState,
areaOptions, areaOptions,
locationOptions, locationOptions,
@@ -421,7 +421,7 @@ const HppPerKandangTab = () => {
const handleExportPDF = useCallback(async () => { const handleExportPDF = useCallback(async () => {
setIsPdfExportLoading(true); setIsPdfExportLoading(true);
try { try {
const allDataForExport = await fetchAllExportData(); const allDataForExport = await hppPerKandangExport();
if ( if (
!allDataForExport || !allDataForExport ||
@@ -468,7 +468,7 @@ const HppPerKandangTab = () => {
setIsPdfExportLoading(false); setIsPdfExportLoading(false);
} }
}, [ }, [
fetchAllExportData, hppPerKandangExport,
tableFilterState, tableFilterState,
areaOptions, areaOptions,
locationOptions, locationOptions,