Merged in feat/SW-165-fix (pull request #467)

fix(SW-165): fix issue with pagination now showing

Approved-by: Michael Zetterberg
This commit is contained in:
Tobias Johansson
2024-08-23 07:35:30 +00:00
committed by Michael Zetterberg

View File

@@ -535,11 +535,12 @@ export const userQueryRouter = router({
return dateA > dateB ? -1 : 1 return dateA > dateB ? -1 : 1
}) })
.slice(limit * (page - 1), limit * page)
const slicedData = pageData.slice(limit * (page - 1), limit * page)
return { return {
data: { data: {
transactions: pageData.map(({ type, attributes }) => { transactions: slicedData.map(({ type, attributes }) => {
return { return {
type, type,
awardPoints: attributes.awardPoints, awardPoints: attributes.awardPoints,