Admin page
This commit is contained in:
parent
94d3369d4e
commit
54b01f81c5
@ -1,15 +1,14 @@
|
||||
/* eslint-disable react/jsx-key */
|
||||
import React from "react";
|
||||
import "../styles/Admin.css";
|
||||
import { Button, Typography, Container, Paper } from "react-bootstrap";
|
||||
import { TableContainer, TableCell, Table, TableBody, TableRow, TableHead } from "react-bootstrap";
|
||||
// import Typography from '@mui/material/Typography';
|
||||
// import Container from '@mui/material/Container';
|
||||
// import { TableContainer, TableCell, Table, TableBody, TableRow, TableHead, Paper } from '@mui/material';
|
||||
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";
|
||||
|
||||
|
||||
|
||||
export default class AdminTable extends React.Component {
|
||||
class AdminTable extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
@ -32,8 +31,6 @@ export default class AdminTable extends React.Component {
|
||||
],
|
||||
buttonColors: ["black", "", ""]
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
EditButton() {
|
||||
@ -80,9 +77,9 @@ export default class AdminTable extends React.Component {
|
||||
const { id, username, name, email, phone } = user;
|
||||
return (
|
||||
|
||||
<TableRow>
|
||||
<TableCell>{id}</TableCell>
|
||||
<TableRow key={user.id}>
|
||||
<TableCell>{username}</TableCell>
|
||||
<TableCell>{id}</TableCell>
|
||||
<TableCell>{name}</TableCell>
|
||||
<TableCell>{email}</TableCell>
|
||||
<TableCell>{phone}</TableCell>
|
||||
@ -97,7 +94,7 @@ export default class AdminTable extends React.Component {
|
||||
return this.state.suspendedUsers.map((user) => {
|
||||
const { id, username, name, email, phone } = user;
|
||||
return (
|
||||
<TableRow>
|
||||
<TableRow key={user.id}>
|
||||
<TableCell >{id}</TableCell>
|
||||
<TableCell >{username}</TableCell>
|
||||
<TableCell >{name}</TableCell>
|
||||
@ -115,7 +112,7 @@ export default class AdminTable extends React.Component {
|
||||
return this.state.matches.map((match) => {
|
||||
const { id, sport, date, location, description } = match;
|
||||
return (
|
||||
<TableRow>
|
||||
<TableRow key={match.id}>
|
||||
<TableCell>{id}</TableCell>
|
||||
<TableCell>{sport}</TableCell>
|
||||
<TableCell>{date}</TableCell>
|
||||
@ -206,8 +203,12 @@ export default class AdminTable extends React.Component {
|
||||
|
||||
}
|
||||
|
||||
// render() { return (<h1>RANDOM TEXT</h1>); }
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
||||
<div>
|
||||
<h1 id='title'>Administration</h1>
|
||||
<div className='ButtonList'>
|
||||
@ -243,8 +244,9 @@ export default class AdminTable extends React.Component {
|
||||
</TableContainer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//export default AdminTable
|
||||
export default AdminTable;
|
Loading…
Reference in New Issue
Block a user