Attempt trigger process call server side

This commit is contained in:
Andrew Pennington 2024-08-15 22:37:24 +01:00
parent 73bf7f3d79
commit a62e39a776
No known key found for this signature in database
GPG key ID: E9DA097213FD17EA
8 changed files with 21 additions and 16 deletions

View file

@ -5,7 +5,7 @@ import { formatTimeDifference } from '@/lib/utils';
import { BookOpenText, ClockIcon, Delete, ScanEye } from 'lucide-react';
import Link from 'next/link';
import { useEffect, useState } from 'react';
import process from 'process';
import { getServerEnv } from '@/lib/serverEnvironment';
export interface Chat {
id: string;
@ -22,7 +22,7 @@ const Page = () => {
const fetchChats = async () => {
setLoading(true);
const res = await fetch(`${process.env.BACKEND_API_URL}/chats`, {
const res = await fetch(`${getServerEnv("BACKEND_API_URL")}/chats`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',