changed some unused things

This commit is contained in:
cami 2021-07-12 01:06:53 +02:00
parent d1d213ac9d
commit fb5675eebd
3 changed files with 1 additions and 5 deletions

View file

@ -6,7 +6,7 @@ import "@fortawesome/fontawesome-free/css/all.css";
function Navbar() { function Navbar() {
const [click, setClick] = useState(false); const [click, setClick] = useState(false);
const [button, setButton] = useState(true); const [button,setButton] = useState(true);
const handleClick = () => setClick(!click); const handleClick = () => setClick(!click);
const closeMobileMenu = () => setClick(false); const closeMobileMenu = () => setClick(false);

View file

@ -13,7 +13,6 @@ export default function Login() {
const [username, setUsername] = useState(""); const [username, setUsername] = useState("");
const [password, setPassword] = useState(""); const [password, setPassword] = useState("");
const [message, setMessage] = useState("");
const [errorMessage, setErrorMessage] = useState(""); const [errorMessage, setErrorMessage] = useState("");
const [isStatusOk, setIsStatusOk] = useState(""); const [isStatusOk, setIsStatusOk] = useState("");
@ -40,7 +39,6 @@ export default function Login() {
}); });
} else if (response.status === 200) { } else if (response.status === 200) {
response.json().then((resp) => { response.json().then((resp) => {
setMessage(resp.message);
fetch("/api/login", { fetch("/api/login", {
method: "post", method: "post",
body: JSON.stringify(opts), body: JSON.stringify(opts),

View file

@ -24,7 +24,6 @@ export default function Umfrage() {
const [skillsErrorMessage, setSkillsErrorMessage] = useState(""); const [skillsErrorMessage, setSkillsErrorMessage] = useState("");
const [backendErrorMessage, setBackendErrorMessage] = useState(""); const [backendErrorMessage, setBackendErrorMessage] = useState("");
const [backendSuccessMessage, setBackendSuccessMessage] = useState("");
const [isSurveyValidBackend, setIsSurveyValidBackend] = useState(""); const [isSurveyValidBackend, setIsSurveyValidBackend] = useState("");
/* boolean if the values are ok */ /* boolean if the values are ok */
@ -85,7 +84,6 @@ export default function Umfrage() {
}).then((response) => { }).then((response) => {
if (response.status === 200) { if (response.status === 200) {
response.json().then((r) => { response.json().then((r) => {
setBackendSuccessMessage(r.message);
setIsSurveyValidBackend(true); setIsSurveyValidBackend(true);
}); });
} else { } else {