Skip to content

Explain button#31

Open
jgallagher13 wants to merge 2 commits into
ceptor-club:temp5from
jgallagher13:explain-button
Open

Explain button#31
jgallagher13 wants to merge 2 commits into
ceptor-club:temp5from
jgallagher13:explain-button

Conversation

@jgallagher13

Copy link
Copy Markdown

No description provided.

@vercel

vercel Bot commented Feb 16, 2024

Copy link
Copy Markdown

@jgallagher13 is attempting to deploy a commit to the Ceptor Team Team on Vercel.

A member of the Team first needs to authorize it.

@@ -0,0 +1,136 @@
import React, { useState, useEffect } from 'react';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you still need to import react again in this component?

useEffect(() => {
const fetchOpenAIKey = async () => {
try {
const response = await fetch('http://localhost:4000/api/openai-key');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be re-written to having the url as a variable or come from the env file, then the endpoint be added to it.

const url = "http://localhost:4000"

const response = await fetch(`{url}/api/openai-key`);

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.

2 participants