diff --git a/src/client/src/TournamentOverview.js b/src/client/src/TournamentOverview.js
index f89c410..ea162b4 100644
--- a/src/client/src/TournamentOverview.js
+++ b/src/client/src/TournamentOverview.js
@@ -176,6 +176,33 @@ function BracketViewer(props) {
);
}
+function RemovableBar(props) {
+ const [endTime, setendTime] = React.useState(null);
+
+ React.useEffect(() => {
+ fetch(process.env.REACT_APP_API_URL + `/tournament/${props.tournamentId}`)
+ .then(res => res.json())
+ .then(data => {
+ if (data.status !== "OK") {
+ // Do your error thing
+ console.error(data);
+ return;
+ }
+ let endTime = data.data.endTime;
+ setendTime(endTime);
+ })
+ .catch(err => showError(err));
+ })
+ let today = new Date()
+ let yesterday = today.setDate(today.getDate() - 1)
+ let isComplete = new Date(endTime) < yesterday
+ if (isComplete) {
+ return (null)
+ } else {
+ return ()
+ }
+}
+
function showError(error) {
alert("Something went wrong. \n" + error);
console.error(error);
@@ -187,7 +214,7 @@ export default function TournamentOverview(props) {
return (
<>
-
+
>
);