chore: move totalPages to meta
This commit is contained in:
@@ -93,13 +93,11 @@ export default function TransactionTable() {
|
||||
limit,
|
||||
page,
|
||||
})
|
||||
// Should the active page be mirroried in the URL with params?
|
||||
// That way the actual fetch could be moved up and Mobile/Desktop can be strictly server side
|
||||
useEffect(() => {
|
||||
if (typeof data?.data.pages === "number") {
|
||||
setTotalPages(data?.data.pages)
|
||||
if (typeof data?.meta.totalPages === "number") {
|
||||
setTotalPages(data?.meta.totalPages)
|
||||
}
|
||||
}, [data?.data.pages])
|
||||
}, [data?.meta.totalPages])
|
||||
|
||||
useEffect(() => {
|
||||
if (data?.data.transactions) {
|
||||
|
||||
Reference in New Issue
Block a user