fixing sorting from the newest on wallet history
This commit is contained in:
@ -211,7 +211,7 @@ const ManageWalletContextProvider = ({ children }: { children: React.ReactNode }
|
|||||||
const getWalletLists = async (page: number, limit: number, sorting: any, filter: any) => {
|
const getWalletLists = async (page: number, limit: number, sorting: any, filter: any) => {
|
||||||
try {
|
try {
|
||||||
const sortField = sorting.length > 0 ? sorting[0].id : 'created_at';
|
const sortField = sorting.length > 0 ? sorting[0].id : 'created_at';
|
||||||
const sortDirection = sorting.length > 0 ? (sorting[0].desc ? 'DESC' : 'ASC') : 'ASC';
|
const sortDirection = sorting.length > 0 ? (sorting[0].desc ? 'ASC' : 'DESC') : 'DESC';
|
||||||
|
|
||||||
// Initialize filter object
|
// Initialize filter object
|
||||||
let filterParams: any = {};
|
let filterParams: any = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user