On each card, when it scrolls into view, call openai to generate a 4-line verse of a poem about the currently selected launch.
If the call fails, show a snackbar at the top right of the page that disappears in 3 seconds.
While loading, show a loader on the part of the card where the poem will appear.
Always fetch a new poem ( dont cache)
Show the poem at the botttom of the card in its own section
The OpenAI key is already in the .env file inside the root of the spacenext project with the name VITE_OPENAI_API_KEY
On each card, when it scrolls into view, call openai to generate a 4-line verse of a poem about the currently selected launch.
If the call fails, show a snackbar at the top right of the page that disappears in 3 seconds.
While loading, show a loader on the part of the card where the poem will appear.
Always fetch a new poem ( dont cache)
Show the poem at the botttom of the card in its own section
The OpenAI key is already in the .env file inside the root of the spacenext project with the name VITE_OPENAI_API_KEY