ash1eygrace / ai-content

A React app that uses OpenAI's Generative Pre-trained Transformer 3 (GPT-3) autoregressive deep learning language model to generate human-like text.
11 stars 3 forks source link

Generator Component: Refactor to destructure props #66

Closed ash1eygrace closed 1 year ago

ash1eygrace commented 1 year ago

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:

To test

  1. 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. )
  2. 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.