Added Appbars & changed react.fragment to empty <>
This commit is contained in:
parent
7c2a72c285
commit
f602828cfa
|
@ -1,15 +1,19 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { AppBar, Typography, Toolbar } from "@mui/material";
|
import { AppBar, Typography, Toolbar } from "@mui/material";
|
||||||
import HomeImage from "./homeimage";
|
import HomeImage from "./homeimage";
|
||||||
|
import CssBaseline from '@mui/material/CssBaseline'
|
||||||
|
|
||||||
export default function Appbar() {
|
export default function Appbar() {
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<CssBaseline />
|
||||||
<AppBar position="relative" color="primary">
|
<AppBar position="relative" color="primary">
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<HomeImage />
|
<HomeImage />
|
||||||
<Typography>This is an Appbar</Typography>
|
<Typography>This is an Appbar</Typography>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ function ParticipantLimit(props) {
|
||||||
|
|
||||||
function CreateForm(props) {
|
function CreateForm(props) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<form>
|
<form>
|
||||||
<label for="name">Tournament Name:</label>
|
<label for="name">Tournament Name:</label>
|
||||||
<input type="text" id="name" />
|
<input type="text" id="name" />
|
||||||
|
@ -51,18 +51,18 @@ function CreateForm(props) {
|
||||||
<input type="time" id="time" />
|
<input type="time" id="time" />
|
||||||
<br />
|
<br />
|
||||||
</form>
|
</form>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CreateTournament(props) {
|
export default function CreateTournament(props) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<CssBaseline />
|
<CssBaseline />
|
||||||
<Appbar />
|
<Appbar />
|
||||||
<CreateForm />
|
<CreateForm />
|
||||||
<ParticipantLimit />
|
<ParticipantLimit />
|
||||||
<CreateButton />
|
<CreateButton />
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,24 +62,24 @@ function TournamentList() {
|
||||||
fetch("https://jsonplaceholder.typicode.com/todos/1")
|
fetch("https://jsonplaceholder.typicode.com/todos/1")
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.log(data);
|
setData(data.data);
|
||||||
})
|
})
|
||||||
.catch((err) => console.log("oopsie"));
|
.catch((err) => console.log(err.message));
|
||||||
}, []);
|
}, []);
|
||||||
return <div>{data && data.map((id) => console.log(id))}</div>;
|
return <div>{data && data.map((data, i) => <div>{i}</div>)}</div>;
|
||||||
}
|
}
|
||||||
|
//<ListElement name={data[i].name} competitors={data[i].teamLimit} date={data[i].startTime}/>
|
||||||
|
|
||||||
function Home() {
|
function Home() {
|
||||||
return (
|
return (
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<CssBaseline />
|
|
||||||
<Appbar />
|
<Appbar />
|
||||||
<main>
|
<main>
|
||||||
<Container>
|
<Container>
|
||||||
<Box>
|
<Box>
|
||||||
<CreateButton />
|
<CreateButton />
|
||||||
</Box>
|
</Box>
|
||||||
<ListElement
|
{/* <ListElement
|
||||||
name="Weekend Warmup"
|
name="Weekend Warmup"
|
||||||
competitors="16"
|
competitors="16"
|
||||||
date="29.04.2022"
|
date="29.04.2022"
|
||||||
|
@ -93,7 +93,7 @@ function Home() {
|
||||||
name="Sunday Funday"
|
name="Sunday Funday"
|
||||||
competitors="64"
|
competitors="64"
|
||||||
date="01.05.2022"
|
date="01.05.2022"
|
||||||
/>
|
/> */}
|
||||||
<TournamentList />
|
<TournamentList />
|
||||||
</Container>
|
</Container>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
||||||
import { AlertContainer, alert } from "react-custom-alert";
|
import { AlertContainer, alert } from "react-custom-alert";
|
||||||
import HomeImage from "./components/homeimage";
|
import Appbar from './components/appbar';
|
||||||
import SaveButton from "./components/savebutton";
|
import SaveButton from "./components/savebutton";
|
||||||
|
|
||||||
function ManageTournament(props) {
|
function ManageTournament(props) {
|
||||||
|
@ -60,7 +60,7 @@ function InviteButton(props) {
|
||||||
export default function TournamentManager() {
|
export default function TournamentManager() {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<HomeImage />
|
<Appbar />
|
||||||
<ManageTournament />
|
<ManageTournament />
|
||||||
<AnnounceButton />
|
<AnnounceButton />
|
||||||
<InviteButton />
|
<InviteButton />
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
||||||
import HomeImage from "./components/homeimage";
|
import Appbar from './components/appbar';
|
||||||
|
|
||||||
export default function TeamEditor() {
|
export default function TeamEditor() {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<HomeImage />
|
<Appbar />
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
||||||
import HomeImage from "./components/homeimage";
|
import Appbar from './components/appbar';
|
||||||
|
|
||||||
function Announcement() {
|
function Announcement() {
|
||||||
return (
|
return (
|
||||||
|
@ -26,9 +26,9 @@ function Announcement() {
|
||||||
|
|
||||||
export default function TournamentAnnouncement() {
|
export default function TournamentAnnouncement() {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<HomeImage />
|
<Appbar />
|
||||||
<Announcement />
|
<Announcement />
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
||||||
import HomeImage from "./components/homeimage";
|
import Appbar from './components/appbar';
|
||||||
|
|
||||||
export default function TournamentMatches() {
|
export default function TournamentMatches() {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<HomeImage />
|
<Appbar />
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,23 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
|
||||||
import HomeImage from "./components/homeimage";
|
|
||||||
import ManageButton from "./components/managebutton";
|
import ManageButton from "./components/managebutton";
|
||||||
|
import Appbar from './components/appbar';
|
||||||
|
|
||||||
|
function RenderBrackets() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
brackets = []
|
||||||
|
knownTeams = [2,4,8,16,32,64,128,256]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function ViewTournament(params) {
|
function ViewTournament(params) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div id="touOverview"></div>
|
<div id="touOverview"></div>
|
||||||
<Link to="/tournament/teams">
|
<Link to="/tournament/teams">
|
||||||
<button id="manageTeams">Manage Teams </button>
|
<button id="manageTeams">Manage Teams </button>
|
||||||
|
@ -13,16 +25,16 @@ function ViewTournament(params) {
|
||||||
<Link to="/tournament/matches">
|
<Link to="/tournament/matches">
|
||||||
<button id="touMaches">Tournament Matches</button>
|
<button id="touMaches">Tournament Matches</button>
|
||||||
</Link>
|
</Link>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TournamentOverview(props) {
|
export default function TournamentOverview(props) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<HomeImage />
|
<Appbar />
|
||||||
<ManageButton />
|
<ManageButton />
|
||||||
<ViewTournament />
|
<ViewTournament />
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue