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

Sweep: Refactor ColorModeSwitcher to class component. #419

Open
sweep-nightly bot opened this issue Aug 24, 2023 · 1 comment
Open

Sweep: Refactor ColorModeSwitcher to class component. #419

sweep-nightly bot opened this issue Aug 24, 2023 · 1 comment
Assignees
Labels

Comments

@sweep-nightly
Copy link
Contributor

sweep-nightly bot commented Aug 24, 2023

  • In src/ColorModeSwitcher.tsx, define a class ColorModeSwitcher that extends React.Component.
  • In src/ColorModeSwitcher.tsx, implement a render method that returns the same JSX as the functional component.
  • In src/ColorModeSwitcher.tsx, replace the use of useColorMode and useColorModeValue with this.state and this.setState.
  • In src/ColorModeSwitcher.tsx, write unit tests for the refactored component and run them to verify that they pass.

Parent issue: #335

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Aug 24, 2023

0%


❌ Unable to Complete PR

It looks like an issue has occurred around fetching the files. Perhaps the repo has not been initialized. If this error persists contact team@sweep.dev.

@sweep-nightly[bot], please edit the issue description to include more details and I will automatically relaunch.

For bonus GPT-4 tickets, please report this bug on Discord.


🎉 Latest improvements to Sweep:

  • Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
  • Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
  • We released a demo of our chunker, where you can find the corresponding blog and code.

💡 To recreate the pull request edit the issue title or description.

@kevinlu1248 kevinlu1248 changed the title Sweep: Refactor ColorModeSwitcher to class component Sweep: Refactor ColorModeSwitcher to class component. Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant