Web Developer
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