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

refactor LevelBadge to remove redundant usages of useState &useEffect #1224

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

hjaintech
Copy link
Collaborator

@hjaintech hjaintech commented Jul 22, 2023

First thing, PLEASE READ THIS: ReactPlay Code Review Checklist

Description

LevelBadge component was using useState and useEffect hook when neither of them were needed. Refactored out usage of both the hooks in this PR

Fixes #1225

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots or example output

@vercel
Copy link

vercel bot commented Jul 22, 2023

@hjaintech is attempting to deploy a commit to a Personal Account owned by @reactplay on Vercel.

@reactplay first needs to authorize it.

@netlify
Copy link

netlify bot commented Jul 22, 2023

Deploy Preview for reactplayio ready!

Name Link
🔨 Latest commit b024062
🔍 Latest deploy log https://app.netlify.com/sites/reactplayio/deploys/64bc0f458db3b30008e79a2a
😎 Deploy Preview https://deploy-preview-1224--reactplayio.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! contributor, thank you for opening a Pull Request 🎉.

@reactplay/maintainers will review your submission soon and give you helpful feedback. If you're interested in continuing your contributions to open source and want to be a part of a welcoming and fantastic community, we invite you to join our ReactPlay Discord Community.
Show your support by starring ⭐ this repository. Thank you and we appreciate your contribution to open source!
Stale Marking : After 30 days of inactivity this issue/PR will be marked as stale issue/PR and it will be closed and locked in 7 days if no further activity occurs.

@atapas
Copy link
Member

atapas commented Jul 23, 2023

@hjaintech changes look good. We need an issue to merge the PR. Could you please create one and update the description with the issue number? We will merge it after that.

@atapas atapas self-requested a review July 23, 2023 02:40
Copy link
Member

@atapas atapas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.. Waiting for isue to be created to merge. @hjaintech

@hjaintech
Copy link
Collaborator Author

Looks good.. Waiting for isue to be created to merge. @hjaintech

Done @atapas

@atapas atapas merged commit 0046d0c into reactplay:main Jul 23, 2023
6 of 7 checks passed
@hjaintech hjaintech deleted the level_badge_refactoring branch July 23, 2023 05:06
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.

LevelBadge component uses useState and useEffect when it's not needed
2 participants