Fix rendering of events in Availability & refactor

- Possible dates were not ordered by dates, which in turn crashed
the rendering of Availability component
- Token was not added to headers after login
- Refactor Schedule by removing useless UseEffect
- Simplify rendering of events in Selected Dates (for now)
This commit is contained in:
2020-09-02 23:08:41 +02:00
parent 8dbe2185de
commit 6cc19211c1
8 changed files with 35 additions and 46 deletions

View File

@@ -10,6 +10,7 @@ export const backend = axios.create({
},
});
// Add token if already in local storage
if (existingToken) {
backend.defaults.headers.common['Authorization'] = JSON.parse(existingToken);
}