Hello. I'm currently building this app which in the 'All' page where all the posts are displayed, I am implementing infinitequery. The error I'm getting is getNextPageParam accepting type error. The problem is because getNextPageParam() callback is expecting a number but Appwrite query method for infinite scrolling pagination Query.cursorAfter is accepting string as argument. I've tried everything, including chatGPt for help to no avail. Typescript is complaining this error obviously and its the only error in my app that's failing in production. It works on development however. Here is the link to the gist. Any help is greatly appreciated. it's very frustrating really... when i console.log(lastpage), lastPage is an object { total: number, documents: [{...}] } https://gist.github.com/joujou144/7a6358e447aa08d4a4bae221fa6b0212
What is pageParams supposed to be? Is that the id of a document? It sounds more like you confused the two types of pagination
cursorAfter requires the documentId aka the documentId where it should continue
Offset pagination uses integer to paginate
Recommended threads
- Project is currently blocked
When accessing the Appwrite console, I receive the message: "Project is currently blocked. Access to this project is restricted. Contact support if the issue pe...
- {"code": 1008, "message": "Invalid Origi...
Nothing has changed in my application or console settings so I'm curious as to what I need to do to fix this. I already have the client registered so I'm not en...
- SSL certificate issuance failed:
Domain verifies but SSL cert fails, tried different subdomains like .api and .aw, used cname and CAA, no prior CAA existed on website, tried Multiple CAAs at on...