From bcf912c18c2bcebe31e857cf8879b15545db02e9 Mon Sep 17 00:00:00 2001 From: Kristoffer Longva Eriksen Date: Thu, 24 Mar 2022 10:36:44 +0100 Subject: [PATCH] Added save, add and remove buttons to teameditor --- src/client/src/teameditor.js | 40 +++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/src/client/src/teameditor.js b/src/client/src/teameditor.js index 2e9b09b..f6daae6 100644 --- a/src/client/src/teameditor.js +++ b/src/client/src/teameditor.js @@ -29,18 +29,19 @@ function TeamChanger() { variant="filled" label="Members:" /> +
+ ); } - +var teams = { + "team 1": ["tom", "eric", "gustav"], + "team 2": ["emma", "mari", "ida"], + "team 3": ["ola", "ole", "ost"], + "team 4": ["christine", "kristine", "kristhine"], +}; function TeamList() { - let teams = { - "team 1": ["tom", "eric", "gustav"], - "team 2": ["emma", "mari", "ida"], - "team 3": ["ola", "ole", "ost"], - "team 4": ["christine", "kristine", "kristhine"], - }; const [teamInput, setteamInput] = React.useState(""); const [membersInput, setmembersInput] = React.useState(""); React.useEffect(() => { @@ -49,6 +50,7 @@ function TeamList() { }); return (
+ Registered teams: