Currently, when fetching poetries with pagination (5 items per page), each page is sorted independently by likes count. This results in an incorrectly sorted overall collection.
Desired Behavior: Sort the entire collection of poetries by likes count, then apply pagination to fetch 5 items at a time.
Question: How can we modify the Convex query to sort all poetries by likes count before applying pagination?
Currently, when fetching poetries with pagination (5 items per page), each page is sorted independently by likes count. This results in an incorrectly sorted overall collection.
Desired Behavior: Sort the entire collection of poetries by likes count, then apply pagination to fetch 5 items at a time.
Question: How can we modify the Convex query to sort all poetries by likes count before applying pagination?