This pull request updates the GeneratorComponent to destructure the generatorData prop directly in the function arguments. This makes the component code more concise and easier to read.
Changes include:
Destructuring generatorData prop in the function arguments of GeneratorComponent.
Removing the use of props throughout the component.
No functional changes were made, and the component should continue to work as expected.
To test
Open any of the generator pages, and submit a prompt to get AI-generated content. The generator should load with the details that are passed as props (title, description, prompt example in the input field, etc. )
Enter a prompt to get your desired response from the AI. Functionally, the state should change to loading and then to the response with the useTypingEffect.
Solves: Refactor: Destructure Props #24
This pull request updates the GeneratorComponent to destructure the
generatorData
prop directly in the function arguments. This makes the component code more concise and easier to read.Changes include:
generatorData
prop in the function arguments ofGeneratorComponent
.props
throughout the component.To test
useTypingEffect
.