diff --git a/src/components/App.tsx b/src/components/App.tsx index 69c53e0..37ca50b 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -21,7 +21,7 @@ export const App = () => { const { isDataLoading } = useContext(coursesContext)!; const [isOpenTransfer, setOpenTransfer] = useState(false); - const handleTransfer = () => { + const handleTransfer = () => { setOpenTransfer(!isOpenTransfer); }; diff --git a/src/contexts/CoursesProvider.tsx b/src/contexts/CoursesProvider.tsx index 52b9f22..16a8fd5 100644 --- a/src/contexts/CoursesProvider.tsx +++ b/src/contexts/CoursesProvider.tsx @@ -213,7 +213,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => { fetchCourses(); getNewestTimetable(); setIsDataLoading(false); - }, 500); + }, 600); }, []); return ( diff --git a/src/utils/axiosInstance.ts b/src/utils/axiosInstance.ts index 3996748..7761a37 100644 --- a/src/utils/axiosInstance.ts +++ b/src/utils/axiosInstance.ts @@ -5,6 +5,7 @@ export const axiosInstance = axios.create(); axiosInstance.interceptors.request.use( (config) => { const token = localStorage.getItem('userToken'); + config.headers['Content-Type'] = 'application/json'; config.headers['Authorization'] = token ? `Bearer ${token}` : ''; return config;