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

Fix Expiry time in Rewards Activities #1905

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

corlard3y
Copy link
Collaborator

Pull Request Template

#1902

Description

Expiry time in Rewards Points(Quickswap channel) should show days left, not the day of the month

  • 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

@corlard3y corlard3y linked an issue Oct 7, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Oct 7, 2024

  • In the useEffect hook, there is a typo in comparing activity.activityType. Change activity.activityType == 'follow_push_on_discord' and activity.activityType == 'follow_push_on_twitter' to use strict equality comparison ===.
  • In the getUpdatedExpiryTime function, change expiryType to expiryDate when calculating days left to fix the typo.
  • In the RewardsActivitiesListItem component, the property lp in the padding prop of the first Box component should be changed to pl for consistency.
  • In the RewardsActivitiesListItem component, in the condition to render Lozenge for expiry time, change activity?.expiryType to activity.expiryType to remove unnecessary optional chaining.
  • In the RewardsActivitiesListItem component, fix the typo in the property lp of the flexDirection prop in the first Box component. Change lp: 'column-reverse' to pl: 'column-reverse'.
  • In the RewardsActivitiesListItem component, in the check for pending status, change usersSingleActivity?.status === 'PENDING' to usersSingleActivity.status === 'PENDING' to avoid unnecessary optional chaining.

All looks good.

Copy link

github-actions bot commented Oct 7, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-10-07 10:33 UTC

@rohitmalhotra1420 rohitmalhotra1420 merged commit 4cc797d into main Oct 7, 2024
2 of 3 checks passed
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] - Fix Expiry time in Rewards Activities
2 participants