diff --git a/src/client/src/TournamentMatches.js b/src/client/src/TournamentMatches.js
index 44772c8..8311309 100644
--- a/src/client/src/TournamentMatches.js
+++ b/src/client/src/TournamentMatches.js
@@ -1,6 +1,6 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
-import Appbar from './components/Appbar';
+import Appbar from './components/AsuraBar';
function MatchHistory() {
@@ -12,7 +12,7 @@ function MatchHistory() {
export default function TournamentMatches() {
return (
<>
-
+
>
);
diff --git a/src/client/src/TournamentOverview.js b/src/client/src/TournamentOverview.js
index f7fd094..558d56d 100644
--- a/src/client/src/TournamentOverview.js
+++ b/src/client/src/TournamentOverview.js
@@ -10,7 +10,6 @@ import DoDisturbIcon from '@mui/icons-material/DoDisturb';
import BackspaceIcon from '@mui/icons-material/Backspace';
import AddCircleIcon from '@mui/icons-material/AddCircle';
-let isLoggedIn = true;
function showError(error) {
alert("Something went wrong. \n" + error);
@@ -208,8 +207,8 @@ export default function TournamentOverview(props) {
return (
<>
-
- { isLoggedIn && !tournament.hasEnded ?
+
+ { props.user.isLoggedIn && !tournament.hasEnded ?
: null
}
diff --git a/src/client/src/TournamentTeams.js b/src/client/src/TournamentTeams.js
index 90b1487..ea8b13b 100644
--- a/src/client/src/TournamentTeams.js
+++ b/src/client/src/TournamentTeams.js
@@ -205,7 +205,7 @@ export default function TournamentTeams(props) {
return (
<>
-
+
diff --git a/src/client/src/components/AsuraBar.js b/src/client/src/components/AsuraBar.js
index d1384a2..9c84d42 100644
--- a/src/client/src/components/AsuraBar.js
+++ b/src/client/src/components/AsuraBar.js
@@ -9,8 +9,6 @@ import LogoutIcon from '@mui/icons-material/Logout';
import LoginIcon from '@mui/icons-material/Login';
import logo from "./../Asura2222.png";
-var isLoggedIn = false; // props.isLoggedIn;
-
function LoggedInMenu() {
const [anchorEl, setAnchorEl] = React.useState(null);
const open = Boolean(anchorEl);
@@ -22,8 +20,6 @@ function LoggedInMenu() {
};
const logout = () => {
- console.log("Logged out");
- isLoggedIn = false;
setAnchorEl(null);
}
@@ -35,7 +31,7 @@ function LoggedInMenu() {
>
@@ -44,10 +40,7 @@ function LoggedInMenu() {
function NotLoggedInButton() {
-
const login = () => {
- console.log("Logged in");
- isLoggedIn = true;
}
return (
@@ -88,7 +81,7 @@ export default function Appbar(props) {
{ props.pageTitle !== "Sign in" ?
- { isLoggedIn ? : }
+ { props.user.isLogggedIn ? : }
: