Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Pagination for Activities Page #1688

Merged

Conversation

abhishek-01k
Copy link
Collaborator

@abhishek-01k abhishek-01k commented Jul 2, 2024

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.

  • Problem/Feature:

Type of Change

  • Bug fix
  • New feature
  • Code refactor
  • Documentation update
  • Other (please describe):

Checklist

  • Quick PR: Is this a quick PR? Can be approved before finishing a coffee.
    • Quick PR label added
  • Not Merge Ready: Is this PR dependent on some other PR/tasks and not ready to be merged right now.
    • DO NOT Merge PR label added

Frontend Guidelines

Build & Testing

  • No errors in the build terminal
  • Engineer has tested the changes on their local environment
  • Engineer has tested the changes on deploy preview

Screenshots/Video with Explanation

  • Before: Explain the previous behavior

  • After: What's changed now

Additional Context

Review & Approvals

  • Self-review completed
  • Code review by at least one other engineer
  • Documentation updates if applicable

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

Copy link

github-actions bot commented Jul 2, 2024

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.

@rohitmalhotra1420 rohitmalhotra1420 merged commit aee92e6 into rewardsV1 Jul 3, 2024
1 of 2 checks passed
@rohitmalhotra1420 rohitmalhotra1420 linked an issue Jul 3, 2024 that may be closed by this pull request
rohitmalhotra1420 added a commit that referenced this pull request Jul 3, 2024
* added rewards module

* added /rewards route and changed the snap section in dashboard (#1647)

* added route and layout

* added route and layout

* added header tag

* added review comments

* rewards tabs + dashboard tab ui

* fixed ui

* added leadership board UI

* fixed the colors

* fixed border radius

* Activities tab UI - Rewards page (#1651)

* update UI

* fix: resolve comments and pull rewardsv1

* chore: add dark mode style

* PR fixes done

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* added lozenge and leaderboard tab (#1653)

* added lozenge navigation

* added navigation on tab switch

* added navigation on tab switch

* included rewards header in rewards page

* added dark mode support for lozenge

* added dark mode support for leaderboard

* added heading

* changed the background color in masterInterface

* changed the background color in masterInterface

* review fixes

* added review fixes

* Leaderboard api (#1658)

* added api integration

* fixed loading state of leaderboard and some refactoring

* pagination fix needed

* pagination fix needed

* added null page

* added ens resolution

* fixed the infinite scroll issue

* fixed order

* fixed the components

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* API Integration of Rewards Activities (#1659)

* dark-mode implementation

* added lozenge and leaderboard tab (#1653)

* added lozenge navigation

* added navigation on tab switch

* added navigation on tab switch

* included rewards header in rewards page

* added dark mode support for lozenge

* added dark mode support for leaderboard

* added heading

* changed the background color in masterInterface

* changed the background color in masterInterface

* review fixes

* added review fixes

* chore: add wallet connect hook

* fix: add update icon

* Mobile Viewport and Dark Mode feature added to the rewards page

* Fixed the width of the reward points

* update queries

* add ref section

* add click to copy

* update code

* Added API Integration of get all activities, create new activity, create user id and also discord

* resolve conflicts and merge image

* resolve comments

* fixed discord error

* resolve all comments

* Added Flow for discord

* chore: create user api

* Update Total Points in header

* fixed things

---------

Co-authored-by: corlard3y <[email protected]>
Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: rohitmalhotra1420 <[email protected]>

* chore: add image

* prop fixed

* Update image name

* fixed the file name

* added none type to border type

* mapped the url and name in the response for the activities and also fixed the redirect url

* update initial commits

* update routes && fix other comments

* update rewards page

* Fixed some of the comments

* add base-url

* update unused variables

* fix design qa

* update design fixes

* remove usegenerateuserid files && fixes

* fix loader

* update text width

* added support for align self in box

* added custom hook for discird session

* replaced custom hook with useSearchParams hook

* removed log

* fixed types

* Twitter Integration in the rewards (#1672)

* Twitter Integration in the rewards

* Fixed the verify Twitter flow

* Fixed the query keys

* Removed flex 1 property

* Removed the desc in case of discord and twitter

* Fixed all the changes related to Reward Activities

* Fixed the button UI and made a separate common button component

* Changed the files of getRewardsActivityTitle to a new file in utils

* fix button min-width

* Client Id for discord

* Updated Preview.yml file

* added support for rewards base URL

* add userGenerateUser hook

* Fixed the Connect and User Profile Modal on rewards page

* fix onboard text

* add pagewrapper

* add base path

* update preview url

* add base

* remove unused helper

* layout and refeactor

* fixed dashboard layout

* staging URL updated for points

* fixed the firebase configs

* changed vapid keys for firebase

* reverted back to firebase config of the app

* fixed export issues

* Fixed the URL issue with the discord

* added points/vault routes (#1683)

* added points/vault routes

* removed /login route

* Points login page (#1687)

* login page changes

* login page changes

* login page changes

* login page changes

* fixed review comments

* fixed review comments

* Removed the loading state in the button and added the disabled label in the verifying state

* Added Pagination for Activities Page (#1688)

* Add Vault List (#1689)

* feat: add vault list

* chore: fix search

* chore: fix issues and refactor code

* chore: update leaderboard skeleton count to 10

* chore: update activity list query keys

* fixed the query invalidation for vault listing

* bug: fix empty params request

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* added min-width to  buttons

---------

Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Kolade <[email protected]>
Co-authored-by: Abhishek <[email protected]>
Co-authored-by: abhishek-01k <[email protected]>
Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Kalash Shah <[email protected]>
corlard3y added a commit that referenced this pull request Jul 3, 2024
* added rewards module

* added /rewards route and changed the snap section in dashboard (#1647)

* added route and layout

* added route and layout

* added header tag

* added review comments

* rewards tabs + dashboard tab ui

* fixed ui

* added leadership board UI

* fixed the colors

* fixed border radius

* Activities tab UI - Rewards page (#1651)

* update UI

* fix: resolve comments and pull rewardsv1

* chore: add dark mode style

* PR fixes done

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* added lozenge and leaderboard tab (#1653)

* added lozenge navigation

* added navigation on tab switch

* added navigation on tab switch

* included rewards header in rewards page

* added dark mode support for lozenge

* added dark mode support for leaderboard

* added heading

* changed the background color in masterInterface

* changed the background color in masterInterface

* review fixes

* added review fixes

* Leaderboard api (#1658)

* added api integration

* fixed loading state of leaderboard and some refactoring

* pagination fix needed

* pagination fix needed

* added null page

* added ens resolution

* fixed the infinite scroll issue

* fixed order

* fixed the components

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* API Integration of Rewards Activities (#1659)

* dark-mode implementation

* added lozenge and leaderboard tab (#1653)

* added lozenge navigation

* added navigation on tab switch

* added navigation on tab switch

* included rewards header in rewards page

* added dark mode support for lozenge

* added dark mode support for leaderboard

* added heading

* changed the background color in masterInterface

* changed the background color in masterInterface

* review fixes

* added review fixes

* chore: add wallet connect hook

* fix: add update icon

* Mobile Viewport and Dark Mode feature added to the rewards page

* Fixed the width of the reward points

* update queries

* add ref section

* add click to copy

* update code

* Added API Integration of get all activities, create new activity, create user id and also discord

* resolve conflicts and merge image

* resolve comments

* fixed discord error

* resolve all comments

* Added Flow for discord

* chore: create user api

* Update Total Points in header

* fixed things

---------

Co-authored-by: corlard3y <[email protected]>
Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: rohitmalhotra1420 <[email protected]>

* chore: add image

* prop fixed

* Update image name

* fixed the file name

* added none type to border type

* mapped the url and name in the response for the activities and also fixed the redirect url

* update initial commits

* update routes && fix other comments

* update rewards page

* Fixed some of the comments

* add base-url

* update unused variables

* fix design qa

* update design fixes

* remove usegenerateuserid files && fixes

* fix loader

* update text width

* added support for align self in box

* added custom hook for discird session

* replaced custom hook with useSearchParams hook

* removed log

* fixed types

* Twitter Integration in the rewards (#1672)

* Twitter Integration in the rewards

* Fixed the verify Twitter flow

* Fixed the query keys

* Removed flex 1 property

* Removed the desc in case of discord and twitter

* Fixed all the changes related to Reward Activities

* Fixed the button UI and made a separate common button component

* Changed the files of getRewardsActivityTitle to a new file in utils

* fix button min-width

* Client Id for discord

* Updated Preview.yml file

* added support for rewards base URL

* add userGenerateUser hook

* Fixed the Connect and User Profile Modal on rewards page

* fix onboard text

* add pagewrapper

* add base path

* update preview url

* add base

* remove unused helper

* layout and refeactor

* fixed dashboard layout

* staging URL updated for points

* fixed the firebase configs

* changed vapid keys for firebase

* reverted back to firebase config of the app

* fixed export issues

* Fixed the URL issue with the discord

* added points/vault routes (#1683)

* added points/vault routes

* removed /login route

* Points login page (#1687)

* login page changes

* login page changes

* login page changes

* login page changes

* fixed review comments

* fixed review comments

* Removed the loading state in the button and added the disabled label in the verifying state

* Added Pagination for Activities Page (#1688)

* Add Vault List (#1689)

* feat: add vault list

* chore: fix search

* chore: fix issues and refactor code

* chore: update leaderboard skeleton count to 10

* chore: update activity list query keys

* fixed the query invalidation for vault listing

* bug: fix empty params request

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* added min-width to  buttons

---------

Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Kolade <[email protected]>
Co-authored-by: Abhishek <[email protected]>
Co-authored-by: abhishek-01k <[email protected]>
Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Kalash Shah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [BUG] - Add Pagination for the Activities page
2 participants