diff --git a/src/frontend/src/components/promptComponent/index.tsx b/src/frontend/src/components/promptComponent/index.tsx index 96c91baac..10ac41281 100644 --- a/src/frontend/src/components/promptComponent/index.tsx +++ b/src/frontend/src/components/promptComponent/index.tsx @@ -32,7 +32,7 @@ export default function PromptAreaComponent({ { setMyValue(t); onChange(t); @@ -53,7 +53,7 @@ export default function PromptAreaComponent({ { setMyValue(t); onChange(t); diff --git a/src/frontend/src/components/textAreaComponent/index.tsx b/src/frontend/src/components/textAreaComponent/index.tsx index edc21f044..b4ec85fe3 100644 --- a/src/frontend/src/components/textAreaComponent/index.tsx +++ b/src/frontend/src/components/textAreaComponent/index.tsx @@ -24,7 +24,7 @@ export default function TextAreaComponent({ onClick={() => { openPopUp( { @@ -45,7 +45,7 @@ export default function TextAreaComponent({ onClick={() => { openPopUp( { diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index 7f2033164..b804803ea 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -6,156 +6,155 @@ import { darkContext } from "../../contexts/darkContext"; import { checkPrompt } from "../../controllers/API"; import { alertContext } from "../../contexts/alertContext"; export default function PromptAreaModal({ - value, - setValue, - buttonText, - modalTitle + value, + setValue, + buttonText, + modalTitle, }: { - setValue: (value: string) => void; - value: string; - buttonText: string; - modalTitle: string; + setValue: (value: string) => void; + value: string; + buttonText: string; + modalTitle: string; }) { + const [myButtonText, setmyButtonText] = useState(buttonText); + const [myModalTitle, setMyModalTitle] = useState(modalTitle); + const [open, setOpen] = useState(true); + const [myValue, setMyValue] = useState(value); + const { dark } = useContext(darkContext); + const { setErrorData, setSuccessData } = useContext(alertContext); + const { closePopUp } = useContext(PopUpContext); + const ref = useRef(); + function setModalOpen(x: boolean) { + setOpen(x); + if (x === false) { + setTimeout(() => { + closePopUp(); + }, 300); + } + } - const [myButtonText, setmyButtonText] = useState(buttonText); - const [myModalTitle, setMyModalTitle] = useState(modalTitle); - const [open, setOpen] = useState(true); - const [myValue, setMyValue] = useState(value); - const { dark } = useContext(darkContext); - const { setErrorData, setSuccessData } = useContext(alertContext); - const { closePopUp } = useContext(PopUpContext); - const ref = useRef(); - function setModalOpen(x: boolean) { - setOpen(x); - if (x === false) { - setTimeout(() => { - closePopUp(); - }, 300); - } - } + return ( + + + +
+ - return ( - - - -
- - -
-
- - -
- -
-
-
-
-
-
- - {myModalTitle} - -
-
-
-
-
-