This commit is contained in:
parent
86fe1eedb4
commit
be0490a1d3
|
|
@ -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}`);
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user