diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx index 826ccf310..0c8e9dcba 100644 --- a/src/frontend/src/modals/genericModal/index.tsx +++ b/src/frontend/src/modals/genericModal/index.tsx @@ -171,7 +171,7 @@ export default function GenericModal({ return ( - + {myModalTitle} @@ -200,7 +200,7 @@ export default function GenericModal({
{type == TypeModal.PROMPT && isEdit ? ( @@ -238,40 +238,40 @@ export default function GenericModal({ {type == TypeModal.PROMPT && ( <> -
-
- - - Input Variables:{" "} - {wordsHighlight && wordsHighlight.length == 0 ? "-" : ""} - +
+
+ + + Input Variables:{" "} + {wordsHighlight && wordsHighlight.length == 0 ? "-" : ""} + - {wordsHighlight.map((word, index) => ( - ( + + - -
- - {word.replace(/[{}]/g, "").length > 59 - ? word.replace(/[{}]/g, "").slice(0, 56) + "..." - : word.replace(/[{}]/g, "")} - -
-
-
- ))} -
+
+ + {word.replace(/[{}]/g, "").length > 59 + ? word.replace(/[{}]/g, "").slice(0, 56) + "..." + : word.replace(/[{}]/g, "")} + +
+ + + ))}
- +
+ )} @@ -284,7 +284,9 @@ export default function GenericModal({ setModalOpen(false); break; case 2: - validatePrompt(false); + !inputValue || inputValue == "" + ? setModalOpen(false) + : validatePrompt(false); break; default: