increased delay

This commit is contained in:
Maciek Głowacki 2020-12-14 17:20:44 +01:00
parent f7a3ab53c5
commit 39a7e109c8
3 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,7 @@ export const App = () => {
const { isDataLoading } = useContext(coursesContext)!; const { isDataLoading } = useContext(coursesContext)!;
const [isOpenTransfer, setOpenTransfer] = useState(false); const [isOpenTransfer, setOpenTransfer] = useState(false);
const handleTransfer = () => { const handleTransfer = () => {
setOpenTransfer(!isOpenTransfer); setOpenTransfer(!isOpenTransfer);
}; };

View File

@ -213,7 +213,7 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => {
fetchCourses(); fetchCourses();
getNewestTimetable(); getNewestTimetable();
setIsDataLoading(false); setIsDataLoading(false);
}, 500); }, 600);
}, []); }, []);
return ( return (

View File

@ -5,6 +5,7 @@ export const axiosInstance = axios.create();
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
(config) => { (config) => {
const token = localStorage.getItem('userToken'); const token = localStorage.getItem('userToken');
config.headers['Content-Type'] = 'application/json'; config.headers['Content-Type'] = 'application/json';
config.headers['Authorization'] = token ? `Bearer ${token}` : ''; config.headers['Authorization'] = token ? `Bearer ${token}` : '';
return config; return config;