diff --git a/anwendung/src/components/PopUp.jsx b/anwendung/src/components/PopUp.jsx index 234f96b..b0723d0 100644 --- a/anwendung/src/components/PopUp.jsx +++ b/anwendung/src/components/PopUp.jsx @@ -1,13 +1,22 @@ import Button from "@/components/Button"; import {useState} from "react"; +let shown = false; + export default function PopUp() { - let shown = false; - const [hidden, setHidden] = useState("none"); + const [displayState, setDisplayState] = useState("none"); function toggleModal() { shown = !shown; - setHidden(shown ? "block" : "none") + if (shown) + { + setDisplayState("block"); + } + else + { + setDisplayState("none"); + } + console.log("test"); } function on_abgeben_pressed() @@ -20,7 +29,7 @@ export default function PopUp() {