usuniecie auomatycznego liczenia

This commit is contained in:
unknown 2024-01-20 20:15:03 +01:00
parent 234d08d0c1
commit 2d338824f8

View File

@ -15,37 +15,37 @@ const Hero = () => {
const [redirect, SetRedirect] = useState(0); const [redirect, SetRedirect] = useState(0);
const handleMinuteChange = (e) => { setGameMinute(e.target.value); const handleMinuteChange = (e) => { setGameMinute(e.target.value);
sentQuestion(); //sentQuestion();
} }
const handleFirstShotChange = (event) => { const handleFirstShotChange = (event) => {
setfirstShot(event.target.checked); setfirstShot(event.target.checked);
sentQuestion(); //sentQuestion();
}; };
const handleOneOnOneChange = (event) => { const handleOneOnOneChange = (event) => {
SetoneOnOne(event.target.checked); SetoneOnOne(event.target.checked);
sentQuestion(); //sentQuestion();
}; };
const handleAfterAirDuelChange = (event) => { const handleAfterAirDuelChange = (event) => {
SetafterAirDuele(event.target.checked); SetafterAirDuele(event.target.checked);
sentQuestion(); //sentQuestion();
}; };
const handleOpenGoalChange = (event) => { const handleOpenGoalChange = (event) => {
SetOpenGoal(event.target.checked); SetOpenGoal(event.target.checked);
sentQuestion(); //sentQuestion();
}; };
const handleAfterDribblingChange = (event) => { const handleAfterDribblingChange = (event) => {
SetafterDribbling(event.target.checked); SetafterDribbling(event.target.checked);
sentQuestion(); //sentQuestion();
}; };
const handleRedirectChange = (event) => { const handleRedirectChange = (event) => {
SetRedirect(event.target.checked); SetRedirect(event.target.checked);
sentQuestion(); //sentQuestion();
}; };
@ -152,7 +152,7 @@ const handleRedirectChange = (event) => {
}else if(possition == 0){ }else if(possition == 0){
setNumberOfShooters(number_of_shooters_rev.current -= 1); setNumberOfShooters(number_of_shooters_rev.current -= 1);
} }
sentQuestion() //sentQuestion()
} }
// funkcja zsczytuje pozycje zawodnikow przed wyslaniem zapytania do serwera // funkcja zsczytuje pozycje zawodnikow przed wyslaniem zapytania do serwera
@ -289,12 +289,12 @@ const handleRedirectChange = (event) => {
}) })
}) })
bojo.addEventListener("mouseup", function reload(){ bojo.addEventListener("mouseup", function reload(){
sentQuestion(); //sentQuestion();
bojo.removeEventListener("mouseup",reload) bojo.removeEventListener("mouseup",reload)
}) })
}) })
sentQuestion(); //sentQuestion();
} }
// // Wyłanie zapytania do serwera // // Wyłanie zapytania do serwera
function sentQuestion() { function sentQuestion() {
@ -400,7 +400,8 @@ const handleRedirectChange = (event) => {
<form className="dropdown" id = "bodyPartList"> <form className="dropdown" id = "bodyPartList">
<select className="dropbtn" <select className="dropbtn"
onChange={event => {setBodyPart(event.target.value); onChange={event => {setBodyPart(event.target.value);
sentQuestion()}} //sentQuestion()
}}
defaultValue={bodyPart}> defaultValue={bodyPart}>
<option value = "Right Foot">Noga Prawa</option> <option value = "Right Foot">Noga Prawa</option>
<option value = "Left Foot">Noga Lewa</option> <option value = "Left Foot">Noga Lewa</option>
@ -414,7 +415,7 @@ const handleRedirectChange = (event) => {
<form className="dropdown" id = "shootTypeList"> <form className="dropdown" id = "shootTypeList">
<select className="dropbtn" onChange={event => {setTechnique(event.target.value); <select className="dropbtn" onChange={event => {setTechnique(event.target.value);
sentQuestion() //sentQuestion()
}} }}
defaultValue = {technique}> defaultValue = {technique}>
<option value="Normal"> Zwykły </option> <option value="Normal"> Zwykły </option>
@ -428,7 +429,8 @@ const handleRedirectChange = (event) => {
</form> </form>
<form className="dropdown" id = "actionTypeList" onChange={event => {setActionType(event.target.value); <form className="dropdown" id = "actionTypeList" onChange={event => {setActionType(event.target.value);
sentQuestion()}} //sentQuestion()
}}
defaultValue={technique}> defaultValue={technique}>
<select className="dropbtn"> <select className="dropbtn">
<option value = "Open Play"> Atak Pozycyjny </option> <option value = "Open Play"> Atak Pozycyjny </option>
@ -439,7 +441,8 @@ const handleRedirectChange = (event) => {
</form> </form>
<form className="dropdown" id = "possitionList" <form className="dropdown" id = "possitionList"
onChange={event => {setPossition(event.target.value); onChange={event => {setPossition(event.target.value);
sentQuestion()}} //sentQuestion()
}}
defaultValue={shooterPossition}> defaultValue={shooterPossition}>
<select className="dropbtn"> <select className="dropbtn">
<option value="Right Center Forward">Prawy Środkowy Napastnik</option> <option value="Right Center Forward">Prawy Środkowy Napastnik</option>