This commit is contained in:
KarimAldeen 2024-03-30 10:23:22 +03:00
parent 86fe1eedb4
commit be0490a1d3
2 changed files with 3 additions and 3 deletions

View File

@ -59,10 +59,10 @@ const OrderPage = () => {
queryParams.push(`state=${state}`); queryParams.push(`state=${state}`);
} }
if (fromDate !== null) { if (fromDate !== null) {
queryParams.push(`fromDate=${fromDate}`); queryParams.push(`createdFrom=${fromDate}`);
} }
if (toDate !== null) { if (toDate !== null) {
queryParams.push(`toDate=${toDate}`); queryParams.push(`createdTo=${toDate}`);
} }
if (totalFrom !== null) { if (totalFrom !== null) {
queryParams.push(`totalFrom=${totalFrom}`); queryParams.push(`totalFrom=${totalFrom}`);

View File

@ -23,7 +23,7 @@ export default function useGetQueryPagination(KEY: string | string[], Api: strin
return useQuery( return useQuery(
[Array.isArray(KEY) ? KEY.join(',') : KEY, pagination], async () => { [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; return response.data;
}, },
{ {