planet-webapp icon indicating copy to clipboard operation
planet-webapp copied to clipboard

Review and Adjust Sorting Logic and Cursor Management in contributions.ts

Open coderabbitai[bot] opened this issue 1 year ago • 0 comments
trafficstars

There is a potential issue with the sorting logic and cursor management in the contributions.ts file, specifically related to handling items with a null 'plantDate' and cursor management for gifts. This issue was identified during a pull request review.

The sorting logic is intended to place items with a null 'plantDate' at the beginning, but there seems to be a contradiction in the implementation. Additionally, the cursor management for gifts does not handle null 'plantDate' values effectively, potentially setting the cursor to null instead of a meaningful value.

For more context, see the pull request and the specific comment:

  • PR: https://github.com/Plant-for-the-Planet-org/planet-webapp/pull/2040
  • Comment: https://github.com/Plant-for-the-Planet-org/planet-webapp/pull/2040#discussion_r1559383769

This issue needs further investigation and potential adjustments to align with the intended functionality.

coderabbitai[bot] avatar Apr 10 '24 12:04 coderabbitai[bot]