Fix small nagivation bugs
This commit is contained in:
parent
ff8c8073db
commit
5c78405bf2
2 changed files with 8 additions and 1 deletions
|
@ -60,6 +60,7 @@ function AuthenticatedApp() {
|
||||||
<Route path="/info" element={<Information />} />
|
<Route path="/info" element={<Information />} />
|
||||||
<Route path="/calendar" element={<Calendar />} />
|
<Route path="/calendar" element={<Calendar />} />
|
||||||
<Route path="/login" element={<Navigate to="/home" />} />
|
<Route path="/login" element={<Navigate to="/home" />} />
|
||||||
|
<Route path="/" element={<Navigate to="/home" />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -57,7 +57,13 @@ function UserProvider(props) {
|
||||||
const classrooms = () => {
|
const classrooms = () => {
|
||||||
setState({ ...state, status: 'pending' });
|
setState({ ...state, status: 'pending' });
|
||||||
getClassrooms(user.id).then(data =>
|
getClassrooms(user.id).then(data =>
|
||||||
setState({ status: 'success', user, classrooms: data.data, error: null })
|
setState({
|
||||||
|
status: 'success',
|
||||||
|
user,
|
||||||
|
classrooms: data.data,
|
||||||
|
error: null,
|
||||||
|
pathname,
|
||||||
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue