This commit is contained in:
Sahni-Arjun 2022-04-06 22:57:53 -04:00
parent 468f1cfa31
commit 26abdd6aa5

View File

@ -1,6 +1,8 @@
import React from "react";
import { Button, Table } from "react-bootstrap";
import "../styles/Admin.css";
import { globalContext } from "../context";
import { needUser } from "../utils/routing";
//import Button from "@mui/material/Button";
// import Typography from "@mui/material/Typography";
// import Container from "@mui/material/Container";
@ -31,12 +33,19 @@ export default class Admin extends React.Component {
{ id: 1, sport: "Tennis", date: "08/08/2021", location: "toronto", description: "Tennis match" },
{ id: 2, sport: "Basketball", date: "09/09/2021", location: "toronto", description: "Basketball match" }
],
buttonColors: ["black", "", ""]
buttonColors: ["black", "", ""],
user: null
};
}
static contextType = globalContext;
async componentDidMount() {
await needUser(this.context.navigate);
}
DeleteButton() {
return <Button onClick={() => {
alert("User deleted.");
@ -178,7 +187,7 @@ export default class Admin extends React.Component {
<div className='center'>
<h1 id='title'>Administration</h1>
<Button className='somespace' onClick={() => {
<Button onClick={() => {
this.setState({ buttonColors: ["black", "", ""] });
}} sx={{
margin: 3,