diff --git a/src/Pages/order/OrderPage.tsx b/src/Pages/order/OrderPage.tsx index 3d8957d..a3b0ec1 100644 --- a/src/Pages/order/OrderPage.tsx +++ b/src/Pages/order/OrderPage.tsx @@ -59,10 +59,10 @@ const OrderPage = () => { queryParams.push(`state=${state}`); } if (fromDate !== null) { - queryParams.push(`fromDate=${fromDate}`); + queryParams.push(`createdFrom=${fromDate}`); } if (toDate !== null) { - queryParams.push(`toDate=${toDate}`); + queryParams.push(`createdTo=${toDate}`); } if (totalFrom !== null) { queryParams.push(`totalFrom=${totalFrom}`); diff --git a/src/api/helper/ueGetPagination.tsx b/src/api/helper/ueGetPagination.tsx index 48ab321..378a9b8 100644 --- a/src/api/helper/ueGetPagination.tsx +++ b/src/api/helper/ueGetPagination.tsx @@ -23,7 +23,7 @@ export default function useGetQueryPagination(KEY: string | string[], Api: strin return useQuery( [Array.isArray(KEY) ? KEY.join(',') : KEY, pagination], async () => { - const response = await axios.get(Api + pagination, { params }); + const response = await axios.get(Api + pagination+`?orderById=desc`, { params }); return response.data; }, {