diff --git a/src/client/package-lock.json b/src/client/package-lock.json
index 28abee9..8c98e70 100644
--- a/src/client/package-lock.json
+++ b/src/client/package-lock.json
@@ -9550,6 +9550,11 @@
"warning": "^4.0.3"
}
},
+ "react-custom-alert": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/react-custom-alert/-/react-custom-alert-0.1.2.tgz",
+ "integrity": "sha512-VkxPh4loaDzeQ4THauq5qOETr/SL/4L+4k1Ie3C948nSgxCy0CSY7MKrzkFwiwIiYCxib3/60zIqmTLUECHEww=="
+ },
"react-dev-utils": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.0.tgz",
diff --git a/src/client/package.json b/src/client/package.json
index 69be55f..ee1147a 100644
--- a/src/client/package.json
+++ b/src/client/package.json
@@ -14,6 +14,7 @@
"iarn": "0.0.0",
"react": "^17.0.2",
"react-bootstrap": "^2.2.1",
+ "react-custom-alert": "^0.1.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.2.2",
"react-scripts": "5.0.0",
diff --git a/src/client/src/createtournament.js b/src/client/src/createtournament.js
index 43d5537..5b33ea2 100644
--- a/src/client/src/createtournament.js
+++ b/src/client/src/createtournament.js
@@ -12,18 +12,6 @@ function CreateButton(props) {
);
}
-function FormatSelector(props) {
- return (
-
- Tournament Format:
-
-
- );
-}
-
function ParticipantLimit(props) {
return (
@@ -45,9 +33,6 @@ function CreateForm(props) {
return (
diff --git a/src/client/src/frontpage.js b/src/client/src/frontpage.js
index 34d5c05..5366732 100644
--- a/src/client/src/frontpage.js
+++ b/src/client/src/frontpage.js
@@ -1,6 +1,5 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
-import HomeImage from "./components/homeimage";
import ManageButton from "./components/managebutton";
import CreateTournament from "./createtournament.js";
import TournamentOverview from "./tournamentoverview.js";
@@ -14,12 +13,12 @@ import Button from "@mui/material/Button";
import Container from "@mui/material/Container";
import CssBaseline from "@mui/material/CssBaseline";
import Typography from "@mui/material/Typography";
-import Grid from '@mui/material/Grid';
-import Box from '@mui/material/Box';
+import Grid from "@mui/material/Grid";
+import Box from "@mui/material/Box";
function CreateButton(props) {
return (
-
+
@@ -29,7 +28,7 @@ function CreateButton(props) {
function OverviewButton(props) {
return (
-
+
@@ -57,24 +56,48 @@ function ListElement(props) {
);
}
+function TournamentList() {
+ let [data, setData] = React.useState(null);
+ React.useEffect(() => {
+ fetch("https://jsonplaceholder.typicode.com/todos/1")
+ .then((res) => res.json())
+ .then((data) => {
+ console.log(data);
+ })
+ .catch((err) => console.log("oopsie"));
+ }, []);
+ return
{data && data.map((id) => console.log(id))}
;
+}
+
function Home() {
return (
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
);
}
diff --git a/src/client/src/managetournament.js b/src/client/src/managetournament.js
index 15b3ab5..3f06870 100644
--- a/src/client/src/managetournament.js
+++ b/src/client/src/managetournament.js
@@ -1,5 +1,6 @@
import * as React from "react";
import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
+import { AlertContainer, alert } from "react-custom-alert";
import HomeImage from "./components/homeimage";
import SaveButton from "./components/savebutton";
@@ -39,18 +40,23 @@ function AnnounceButton(props) {
}
function InviteButton(props) {
+ function event() {
+ copy();
+ alertSuccess();
+ }
+ const copy = () => {
+ navigator.clipboard.writeText("discord.gg/asura");
+ };
+ const alertSuccess = () =>
+ alert({ message: "Copied to clipboard.", type: "success" });
return (
-