Attempt trigger process call server side
This commit is contained in:
parent
73bf7f3d79
commit
a62e39a776
8 changed files with 21 additions and 16 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue