From 528cb80c1fa14ea326d1a77d6c5ea3a9aa8cffc8 Mon Sep 17 00:00:00 2001 From: Sahni-Arjun Date: Sun, 6 Mar 2022 21:01:56 -0500 Subject: [PATCH] minor changes, added navbar to admin --- sports-matcher/src/Admin.css | 4 ++++ sports-matcher/src/Admin.js | 35 +++++++++++++++++++------------ sports-matcher/src/App.js | 2 ++ sports-matcher/src/Navbar.js | 40 ++++++++++++++++++------------------ 4 files changed, 48 insertions(+), 33 deletions(-) diff --git a/sports-matcher/src/Admin.css b/sports-matcher/src/Admin.css index 59c9b92..c09116c 100644 --- a/sports-matcher/src/Admin.css +++ b/sports-matcher/src/Admin.css @@ -1,4 +1,8 @@ .MainTable { padding : 20px; +} + +.Title { + margin-top: 40px; } \ No newline at end of file diff --git a/sports-matcher/src/Admin.js b/sports-matcher/src/Admin.js index 9d48546..cf200f2 100644 --- a/sports-matcher/src/Admin.js +++ b/sports-matcher/src/Admin.js @@ -4,6 +4,7 @@ import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; import Container from '@mui/material/Container'; import { TableContainer, TableCell, Table, TableBody, TableRow, TableHead, Paper } from '@mui/material'; +import Navbar from './Navbar'; @@ -36,14 +37,14 @@ class AdminTable extends React.Component { } - EditButton() { + editButton() { return ; } - DeleteButtonClick() { + deleteButtonClick() { return ( @@ -55,20 +56,27 @@ class AdminTable extends React.Component { ) } - NewDeleteButtonClick() { + newDeleteButtonClick() { return (
) } - DeleteButton() { + deleteButton() { return ; } - PardonButton() { + matchDeleteButton() { + return ; + + } + + pardonButton() { return ; @@ -85,8 +93,8 @@ class AdminTable extends React.Component { {name} {email} {phone} - {this.DeleteButton()} - {this.EditButton()} + {this.deleteButton()} + {this.editButton()} ) }) @@ -102,9 +110,9 @@ class AdminTable extends React.Component { {name} {email} {phone} - {this.DeleteButton()} - {this.EditButton()} - {this.PardonButton()} + {this.deleteButton()} + {this.editButton()} + {this.pardonButton()} ) }) @@ -120,8 +128,8 @@ class AdminTable extends React.Component { {date} {location} {description} - {this.DeleteButton()} - {this.EditButton()} + {this.matchDeleteButton()} + {this.editButton()} ) }) @@ -208,7 +216,8 @@ class AdminTable extends React.Component { render() { return (
-

Administration

+ +

Administration

); diff --git a/sports-matcher/src/Navbar.js b/sports-matcher/src/Navbar.js index 6fef1b2..3b3373c 100644 --- a/sports-matcher/src/Navbar.js +++ b/sports-matcher/src/Navbar.js @@ -16,7 +16,7 @@ import { useNavigate } from 'react-router-dom'; const pages = ['Dashboard']; -export default function Navbar(){ +export default function Navbar() { const [anchorElNav, setAnchorElNav] = React.useState(null); const [anchorElUser, setAnchorElUser] = React.useState(null); @@ -38,7 +38,7 @@ export default function Navbar(){ const navigate = useNavigate(); return ( - + {page} ))} - - - - + + + + - - + + - - + + - - Profile - - - Account - - navigate('sign-in')}> - Sign Out - + + Profile + + + Account + + navigate('/sign-in')}> + Sign Out +