additional changes, setup localStorage
This commit is contained in:
@ -4,9 +4,9 @@ export const axiosInstance = axios.create();
|
||||
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config) => {
|
||||
const token = sessionStorage.getItem('userToken');
|
||||
config.headers['Authorization'] = 'Bearer ' + token;
|
||||
const token = localStorage.getItem('userToken');
|
||||
config.headers['Content-Type'] = 'application/json';
|
||||
config.headers['Authorization'] = token ? `Bearer ${token}` : '';
|
||||
return config;
|
||||
},
|
||||
(error) => {
|
||||
|
@ -13,6 +13,10 @@ export const selectGroupsToShow = (schedulerEvents: Array<SchedulerEvent>, index
|
||||
return schedulerEvents.filter(({ time }: { time: [string, string] }) => courseStartTimeToEventRow[time[0]] === index);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//debounce declaration and implementation
|
||||
type Procedure = (...args: any[]) => any;
|
||||
|
||||
interface Debounce {
|
||||
|
Reference in New Issue
Block a user