- Sign in with google
diff --git a/src/client/src/TournamentHistory.js b/src/client/src/TournamentHistory.js
index 9bde926..d9edce7 100644
--- a/src/client/src/TournamentHistory.js
+++ b/src/client/src/TournamentHistory.js
@@ -5,6 +5,7 @@ import AddCircleIcon from '@mui/icons-material/AddCircle';
import KeyboardDoubleArrowDownIcon from '@mui/icons-material/KeyboardDoubleArrowDown';
import KeyboardDoubleArrowUpIcon from '@mui/icons-material/KeyboardDoubleArrowUp';
import Appbar from './components/AsuraBar';
+import LoginPage from './LoginPage';
import EmojiEventsIcon from '@mui/icons-material/EmojiEvents';
@@ -143,16 +144,17 @@ function shorten(description, maxLength) {
>;
}
-export default function TournamentHistory() {
- return (
- <>
-
-
-
- Past Tournaments
-
-
-
- >
- );
+export default function TournamentHistory(props) {
+ if (!props.user.isLoggedIn) { return ; }
+ return (
+ <>
+
+
+
+ Past Tournaments
+
+
+
+ >
+ );
}
\ No newline at end of file
diff --git a/src/client/src/TournamentManager.js b/src/client/src/TournamentManager.js
index 9b01b72..09210e0 100644
--- a/src/client/src/TournamentManager.js
+++ b/src/client/src/TournamentManager.js
@@ -3,6 +3,7 @@ import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
// import { AlertContainer, alert } from "react-custom-alert";
import Appbar from "./components/AsuraBar";
import TournamentBar from "./components/TournamentBar";
+import LoginPage from "./LoginPage";
import { useParams } from "react-router-dom";
import { Button, TextField, Grid, Box, Container, Paper, Stack } from "@mui/material";
import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from "@mui/material";
@@ -220,6 +221,11 @@ export default function TournamentManager(props) {
showError = props.showError;
showSuccess = props.showSuccess;
+
+ if (!props.user.isLoggedIn) {
+ return ;
+ }
+
return (
<>
diff --git a/src/client/src/TournamentOverview.js b/src/client/src/TournamentOverview.js
index 558d56d..f9e696d 100644
--- a/src/client/src/TournamentOverview.js
+++ b/src/client/src/TournamentOverview.js
@@ -2,6 +2,7 @@ import * as React from "react";
import { Link } from "react-router-dom";
import Appbar from './components/AsuraBar';
import TournamentBar from "./components/TournamentBar";
+import ErrorSnackbar from "./components/ErrorSnackbar";
import { useParams } from 'react-router-dom'
import { Button, IconButton, Paper, Stack, CircularProgress, Box, Grid, Typography, Container } from "@mui/material";
import "./components/tournamentBracket.css";
@@ -10,17 +11,11 @@ import DoDisturbIcon from '@mui/icons-material/DoDisturb';
import BackspaceIcon from '@mui/icons-material/Backspace';
import AddCircleIcon from '@mui/icons-material/AddCircle';
-
-function showError(error) {
- alert("Something went wrong. \n" + error);
- console.error(error);
-}
-
function TournamentTier(props){
let roundTypes = ["winner","finals", "semifinals", "quarterfinals", "eighthfinals", "sixteenthfinals", "thirtysecondfinals"];
let matches = [];
for (let i = 0; i < props.matches.length; i++) {
- matches.push();
+ matches.push();
}
return(