fix(admin): fix admin promotion list sort (#13872)

* 🐛 Fix admin promotion list sort

* Create six-squids-vanish.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Bastien
2025-10-28 10:23:01 +01:00
committed by GitHub
parent fa93f18f7d
commit 47b2f7f888
2 changed files with 8 additions and 2 deletions

View File

@@ -11,17 +11,18 @@ export const usePromotionTableQuery = ({
pageSize = 20,
}: UsePromotionTableQueryProps) => {
const queryObject = useQueryParams(
["offset", "q", "created_at", "updated_at"],
["offset", "q", "order", "created_at", "updated_at"],
prefix
)
const { offset, q, created_at, updated_at } = queryObject
const { offset, q, order, created_at, updated_at } = queryObject
const searchParams: HttpTypes.AdminGetPromotionsParams = {
limit: pageSize,
created_at: created_at ? JSON.parse(created_at) : undefined,
updated_at: updated_at ? JSON.parse(updated_at) : undefined,
offset: offset ? Number(offset) : 0,
order,
q,
}