diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js
index 1520322..8788385 100644
--- a/src/components/Sidebar.js
+++ b/src/components/Sidebar.js
@@ -29,7 +29,9 @@ const SidebarMenu = ({menuItems = [], children}) => {
return {label};
});
elements.push(
-
{label}{subElements && }
+
+ {label}{subElements && }
+
{subElements &&
{subElements}
}
diff --git a/src/components/UserControls.js b/src/components/UserControls.js
index 422b109..156c94b 100644
--- a/src/components/UserControls.js
+++ b/src/components/UserControls.js
@@ -1,4 +1,5 @@
import React, { useRef } from "react";
+import { useNavigate } from "react-router";
import '../css/components/UserControls.css';
import { useLoginContext } from "../structures/UserContext";
import ClickDetector from "../util/ClickDetector";
@@ -8,6 +9,7 @@ const UserControls = () => {
const [user, updateUser] = useLoginContext();
const detailsRef = useRef();
+ const navigate = useNavigate();
if (!user) return;
@@ -16,6 +18,7 @@ const UserControls = () => {
if (response.status === 200) {
clearSession();
updateUser();
+ navigate('/login');
}
};
@@ -25,7 +28,7 @@ const UserControls = () => {
Hello {user.displayName || user.username}
-
+