push-protocol / push-dapp

The Push Protocol Dapp
https://app.push.org
Other
42 stars 36 forks source link

Added Pagination for Activities Page #1688

Closed abhishek-01k closed 1 day ago

abhishek-01k commented 2 days ago

Pull Request Template

Ticket Number

1686

Description

Pagination is added to the Activities tab in the rewards Page. Also, an Infinite Scroll bar is also added when the user will scroll to the bottom then more activities will be fetched from the API.

Type of Change

Checklist

Frontend Guidelines

Build & Testing

Screenshots/Video with Explanation

Additional Context

Review & Approvals

Notes

RIght now we have very less activity on the dev server. So, it is hard to test this functionality. This should be added to the rewards V1 page when we have good amount of activities. Or In V2 of the rewards.

OR the backend should give an API to make more activities so that we can test the functionalities in future also. Create a new activity and also delete an activity API will help

github-actions[bot] commented 2 days ago

In the file RewardsActivitiesListItem.tsx, there is a missing closing curly brace for the getUpdatedExpiryTime function:

const getUpdatedExpiryTime = (timestamp: number) => {
  const date = new Date(timestamp * 1000);
  const days = date.getDate();
  return days;
}; // Missing closing curly brace here

Other than that, the provided code seems fine.

All looks good.