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: Remove Excessive Data and Simplify States in GeneratorComponent #45

Merged

Conversation

ash1eygrace
Copy link
Owner

More details about these changes are outlined in Redesign/Refactor: Simplify data passed into GeneratorComponent.js from GeneratorList.js.

This pull request refactors the data/GeneratorList to remove excessive data and simplify our states in GeneratorComponent. The following changes have been made:

  • The h1 property in the objects of the data has been removed, and the title property has been updated to be used as theh1 tag in line 41 of GeneratorComponent.js.
  • After the change, the Card.Text component's initial state is now conditionally rendered based on the dataLoaded and response states using a ternary operator.
  • description2 is now being used

    {description2}

    instead of descriptoin.
  • The response1, response2, and response3 properties in the data objects have been removed, and new states have been set for the GeneratorComponent.js to display appropriate messages using the title prop.

These changes have been thoroughly tested, and everything works as expected.

@ash1eygrace ash1eygrace self-assigned this Mar 28, 2023
@ash1eygrace ash1eygrace merged commit dbe6b5b into main Mar 28, 2023
@ash1eygrace ash1eygrace deleted the refactor/remove-unused-data-from-generator-data-array branch April 9, 2023 16:59
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.

1 participant