From 85da1a709d27ad52449aa26275f3607477d211b1 Mon Sep 17 00:00:00 2001 From: Jonas <jonas.fischer14@gmx.de> Date: Fri, 10 Nov 2023 13:01:59 +0100 Subject: [PATCH] 10.11.23 add tournament component #7 --- sth-frontend/src/Tournament.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sth-frontend/src/Tournament.js b/sth-frontend/src/Tournament.js index 9eb7e82..dd1e04d 100644 --- a/sth-frontend/src/Tournament.js +++ b/sth-frontend/src/Tournament.js @@ -51,9 +51,6 @@ export default function Tournament() { } function Bracket({value, highlight, onScoreChange, index}) { - if (highlight) { - document.getElementById('bracketWrapper').style.border = "3px solid black" - } return <div id="bracketWrapper" style={{display: "flex",flexDirection:"row" ,padding: "10px", border: "1px solid black", width: "fit-content"}}> <div id="teamNameWrapper" style={{display: "flex", flexDirection: "column"}}> <label htmlFor="teamName" style={{fontSize: "8pt"}}>teamname</label> @@ -61,7 +58,7 @@ function Bracket({value, highlight, onScoreChange, index}) { </div> <div id="scoreWrapper" style={{display: "flex", flexDirection: "column", marginLeft: "10px"}}> <label htmlFor={"score"+index} style={{fontSize: "8pt"}}>score</label> - <input id={"score"+index} type="number" style={{width: "35px"}} value={value} onChange={() => onScoreChange(document.querySelector(`#score${index}`).value, index)}/> + <input id={"score"+index} type="number" min={0} style={{width: "35px"}} value={value} onChange={() => onScoreChange(document.querySelector(`#score${index}`).value, index)}/> </div> </div> } \ No newline at end of file -- GitLab