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

Update Rewards S1 Changes #2018

Merged
merged 2 commits into from
Feb 18, 2025
Merged

Update Rewards S1 Changes #2018

merged 2 commits into from
Feb 18, 2025

Conversation

corlard3y
Copy link
Collaborator

@corlard3y corlard3y commented Feb 14, 2025

Pull Request Template

#2017

Description

  • Prepare for Season 1 Closure

  • Add deadline to Rewards

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

In the file src/common/hooks/useRewardsNotification.tsx:

  1. There is a syntax error in the showNotification function. The onClose function is incomplete.
  2. In the showNotificationFn function, the notification.hide() and setHasMounted(false) should be moved outside the else block to execute in both conditions.
  3. The useRewardsNotification function is defined but not being exported at the end of the file.

In the file src/modules/rewards/components/ActivityButton.tsx:

  1. There is a missing closing brace '}' after the 'Claimed' text.
  2. The logic for displaying the ActivityVerificationButton component seems incomplete. It starts but does not end properly.

In the file src/modules/rewards/components/DailyRewardsSection.tsx:

  1. There is an incomplete JSX syntax for the button component 'Ended' within the hasRewardsExpired && condition.
  2. The JSX for the button component 'Ended' is missing a Button wrapper around it.

In the file src/modules/rewards/components/DashboardSectionHeader.tsx:

  1. The Button component in the JSX is missing proper children syntax. It should be nested within curly braces.
  2. The export statement for the component is incomplete. It needs to be export default DashboardSectionHeader.
  3. There seems to be nesting issues in the JSX structure, check if all opening tags have corresponding closing tags.

In the file src/modules/rewards/hooks/useDateExpiry.tsx:

The 'useDateExpiry' custom hook seems fine, no issues detected.

In the file src/structure/Header.tsx:

  1. The RewardsHeaderLink component is not properly closed with a closing curly brace '}'. It should be closed before the 'function Header({ isDarkMode, darkModeToggle }) {' line.
  2. The conditional rendering in the return statement of RewardsHeaderLink seems incomplete and may need correction.

Overall, the files have some syntax errors, incomplete logic, and missing JSX elements that need attention.

Copy link

github-actions bot commented Feb 14, 2025

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2025-02-18 10:41 UTC

Copy link

In the file src/common/hooks/useRewardsNotification.tsx:

  1. In the showNotification function, there is an unnecessary comma after the onClose function. Remove the comma.
  2. In the showNotificationFn function, there is an unnecessary else block with notification.hide() and setHasMounted(false) inside it.
  3. The useEffect dependency array should include hasMounted state variable.

In the file src/modules/rewards/components/ActivityButton.tsx:

  1. In the if statement for 'claimed in this epoch button', the text "Claimed" is not surrounded by quotes or a JSX element.
  2. Inside the 'reset button' if statement, the ActivityVerificationButton component is not being returned.

In the file src/modules/rewards/components/DailyRewardsSection.tsx:

  1. In the section where the Button component is shown with text 'Ended' and 'Locked', those strings should be inside JSX elements or quotes.
  2. The Button component conditional rendering section is missing the return statement or JSX wrapping it.

In the file src/modules/rewards/components/DashboardSectionHeader.tsx:

  1. The export statement for DashboardSectionHeader component is missing a closing curly brace.

In the file src/modules/rewards/hooks/useDateExpiry.tsx:
All looks good.

In the file src/structure/Header.tsx:

  1. The component RewardsHeaderLink has incomplete and broken code starting from the Text component that is not properly closed and deduced to the return statement.
  2. The function Header is missing the closing curly brace.
  3. The useEffect hook in the Header component is missing proper completion and may require additional logic for updating the header tag.

Please make the necessary corrections based on the comments.

@riyanshu-patro riyanshu-patro merged commit 317671b into main Feb 18, 2025
2 checks passed
@riyanshu-patro riyanshu-patro deleted the 2017-rewards-points-s1 branch February 18, 2025 10:41
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.

Rewards Points S1
3 participants