Rename NEXT_PUBLIC_... env variables to allow reading from env at runtime
This commit is contained in:
parent
834a38046f
commit
376220b26e
10 changed files with 22 additions and 22 deletions
|
@ -40,7 +40,7 @@ const useSocket = (
|
|||
);
|
||||
|
||||
const providers = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/models`,
|
||||
`${process.env.BACKEND_API_URL}/models`,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
@ -221,7 +221,7 @@ const loadMessages = async (
|
|||
setNotFound: (notFound: boolean) => void,
|
||||
) => {
|
||||
const res = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/chats/${chatId}`,
|
||||
`${process.env.BACKEND_API_URL}/chats/${chatId}`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
|
@ -272,7 +272,7 @@ const ChatWindow = ({ id }: { id?: string }) => {
|
|||
|
||||
const [isWSReady, setIsWSReady] = useState(false);
|
||||
const ws = useSocket(
|
||||
process.env.NEXT_PUBLIC_WS_URL!,
|
||||
process.env.BACKEND_WS_URL!,
|
||||
setIsWSReady,
|
||||
setHasError,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue