update add data sucos

This commit is contained in:
Raja Oktafrianto
2025-03-18 11:20:43 +07:00
parent f89e37caa3
commit 8026d6910a
4 changed files with 180 additions and 133 deletions

View File

@ -11,6 +11,7 @@ import axios from 'axios';
interface SucosProps {
sucos_id: number;
sucos_name: string;
posto_name: string;
}
interface ContextProps {
@ -159,7 +160,7 @@ const ManageSucosContextProvider = ({ children }: { children: React.ReactNode })
order_direction: sorting[0].desc == false ? 'ASC' : 'DESC',
filter: JSON.stringify(filter)
});
console.log('Sucos List Response:', response?.data);
// console.log('Sucos List Response:', response?.data);
setSucos(response?.data.list || []); // Pastikan default value adalah array kosong
return { data: response?.data.list, totalCount: response?.data.total_count };
} catch (error) {