fix: Sort orders by created_at desc (#7706)

This commit is contained in:
Oli Juhl
2024-06-13 21:31:59 +02:00
committed by GitHub
parent 41528ddecf
commit f138339cbc

View File

@@ -34,6 +34,7 @@ export const useOrderTableQuery = ({
payment_status,
region_id,
q,
order,
} = queryObject
const searchParams: AdminGetOrdersParams = {
@@ -45,6 +46,7 @@ export const useOrderTableQuery = ({
created_at: created_at ? JSON.parse(created_at) : undefined,
updated_at: updated_at ? JSON.parse(updated_at) : undefined,
region_id: region_id?.split(","),
order: order ? order : "-display_id",
q,
}