From b687b3c014cabbedb9233d5f33e42d461a04a047 Mon Sep 17 00:00:00 2001 From: wrzesinski-hubert Date: Sun, 22 Nov 2020 17:24:50 +0100 Subject: [PATCH] courses provider fix bo popsulem --- src/contexts/CoursesProvider.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/contexts/CoursesProvider.tsx b/src/contexts/CoursesProvider.tsx index 5718001..f7fd50d 100644 --- a/src/contexts/CoursesProvider.tsx +++ b/src/contexts/CoursesProvider.tsx @@ -85,7 +85,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => { ); try { - await axiosInstance.post(`http://localhost:1285/api/v1/commisions/add?`, JSON.stringify(basketIds)); + await axiosInstance.post(`${process.env.REACT_APP_API_URL}/api/v1/commisions/add?`, JSON.stringify(basketIds)); enqueueSnackbar('Plan zostaƂ zapisany', { variant: 'success', action, @@ -116,7 +116,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => { const getNewestTimetable = async () => { try { const { data } = await axiosInstance.get( - `http://localhost:1285/api/v1/assignments/getCurrentAssignments`, + `${process.env.REACT_APP_API_URL}/api/v1/assignments/getCurrentAssignments`, ); const basket = data === '' ? [] : data; setBasket(basket); @@ -129,7 +129,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => { const fetchCourses = async () => { try { const { data: courses } = await axiosInstance.get>( - `http://localhost:1285/api/v1/courses/getCoursesWithGroups`, + `${process.env.REACT_APP_API_URL}/api/v1/courses/getCoursesWithGroups`, ); const sortedCourses = courses.sort((a, b) => (a.name > b.name ? 1 : -1)); console.log('courses: ', courses);