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 Rewards Point - LifeTime Issue #1950

Merged
merged 3 commits into from
Oct 30, 2024
Merged

Conversation

corlard3y
Copy link
Collaborator

Pull Request Template

#1949

Description

  • Problem/Feature:
  • Fix LifeTime issue in rewards points(last activity section) to seperate the logic from the reset section

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
    Incase of epoch reset, the last section should not reset, it should retain the status before/after reset

  • 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 30, 2024 that may be closed by this pull request
Copy link

In the code provided, I have found some issues and made the necessary corrections:

  1. In the ActivityButton.tsx file:
  • Typo: ActvityType should be ActivityType.
  • Typo: RefetchActivity should be refetchActivity.
  • Issue: Inside the if block for status 'COMPLETED', the JSX for the Button component is missing a return statement before the Button component.
  • Issue: Inside the if block for status 'PENDING', the text "Pending" should be enclosed within a Text component.
  1. In the RewardsActivitiesBottomSection.tsx file:
  • Issue: The <Box> component has mismatched closing tags. The indentation level suggests that the last closing tag needs to be removed.
  • Issue: In the StakePushSection component, margin and title props are not inside the correct JSX elements.
  1. In the StakePushActivitiesListItem.tsx file:
  • Issue: The Text component inside the activity.multiplier block is missing a closing tag </Text>.
  • Issue: In the logic for condition isLockedOrNotConnected, the Button component is trying to include a prop 'Locked', which should be corrected.
  • Issue: In the logic for condition hasActivityEndedUnclaimed, the Button component is not correctly structured within the JSX.
  1. In the StakePushSection.tsx file:
  • Typo: variant="bs-semibold" should have a more descriptive text and be enclosed in a Text component.
  • Issue: The second Skeleton component does not have a closing tag.
  • Issue: Inside the final <Box> component, the Text content should be enclosed in quotes.
  • Issue: The prop gap="spacing-sm" is missing a closing curly brace at the end.
  • Issue: The text Staking rewards can be claimed once per reset after a cooldown period of 7 days. is not wrapped in a Text component.

After fixing the above issues, the code should be checked for further functionality and styling concerns to ensure correctness.

Let me know if you need any more help.

Copy link

github-actions bot commented Oct 30, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://push-protocol.github.io/push-dapp/pr-preview/pr-1950/
on branch gh-pages at 2024-10-30 13:40 UTC

@rohitmalhotra1420 rohitmalhotra1420 merged commit 29f88ec into main Oct 30, 2024
2 checks passed
Copy link

In ActivityButton.tsx:

  1. Typo in ActvityType, should be ActivityType.
  2. In the second if statement, the <Button> component is missing a return statement before it.
  3. In the third if statement, the logic for rendering the "Pending" text is missing.
  4. The second and third if conditions should be followed by an else or return to handle cases where the conditions are not met.

In RewardsActivitiesBottomSection.tsx:

  1. The closing Box component before <BonusActivities /> is missing the opening angle bracket <.

In StakePushActivitiesListItem.tsx:

  1. Typo in StakeActivitiesItemProps, should be StakeActivityItemProps.
  2. In the section where activity points and multiplier are displayed, there is a logic issue with nesting the components and text.

In StakePushSection.tsx:

  1. Typo in StakePushPoints, should be StakePushSectionProps.
  2. The useGetUserRewardsDetails hook is missing a closing } after its parameters.
  3. In the map method for allActivities, there is a missing closing parenthesis ) at the end of the method.
  4. In the comment line Staking rewards can be claimed once per reset after a cooldown period of 7 days., it should be enclosed in {} for correct rendering.

Please review and make the necessary corrections.

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.

Fix Rewards Point - LifeTime Issue
2 participants