diff --git a/.env b/.env index e71c4db..c178342 100644 --- a/.env +++ b/.env @@ -1,2 +1,3 @@ # VITE_COORD_URL=http://localhost:4000 -VITE_COORD_URL=https://coord.graff.tech \ No newline at end of file +VITE_COORD_URL=https://coord.graff.tech +VITE_CRM_API_URL=https://crm.stream.graff.tech/api \ No newline at end of file diff --git a/src/components/SidebarTab1.tsx b/src/components/SidebarTab1.tsx index 5d79859..c8ae2b6 100644 --- a/src/components/SidebarTab1.tsx +++ b/src/components/SidebarTab1.tsx @@ -27,7 +27,7 @@ function SidebarTab1() { async function getSchedules() { try { const result: any[] = await ky - .get(`http://localhost:3001/schedules/builds/${buildId}`) + .get(`${import.meta.env.VITE_CRM_API_URL}/schedules/builds/${buildId}`) .json(); setSchedules(result); diff --git a/src/components/SidebarTab2.tsx b/src/components/SidebarTab2.tsx index b38e7d9..ea735b2 100644 --- a/src/components/SidebarTab2.tsx +++ b/src/components/SidebarTab2.tsx @@ -44,7 +44,7 @@ function SidebarTab2() { try { const result: { [key: string]: any } = await ky .get( - `http://localhost:3001/schedules/builds/${buildId}?date=${selectedDay.toISOString()}` + `${import.meta.env.VITE_CRM_API_URL}/schedules/builds/${buildId}?date=${selectedDay.toISOString()}` ) .json(); @@ -84,7 +84,7 @@ function SidebarTab2() { const result: any[] = await ky .get( - `http://localhost:3001/scheduled_sessions/builds/${buildId}?date=${selectedDay?.toISOString()}` + `${import.meta.env.VITE_CRM_API_URL}/scheduled_sessions/builds/${buildId}?date=${selectedDay?.toISOString()}` ) .json();