diff --git a/src/Components/Home/HomePage.js b/src/Components/Home/HomePage.js index 07f097b..5f93f5c 100644 --- a/src/Components/Home/HomePage.js +++ b/src/Components/Home/HomePage.js @@ -456,7 +456,7 @@ const HomePage = () => { {showPromoModal ? ( { const [inputValue, setInputValue] = useState(""); + const [codeError, setCodeError] = useState(""); const title = titleText ? titleText : "Confirmation"; - + const handleConfirm = (code) => { + if (!code) { + setCodeError("Please enter a code"); + return; + } + onConfirm(code); + }; return ( @@ -61,10 +68,17 @@ const ConfirmModal = ({ inputValue ? "" : isPromoModal - ? "Enter your promotional code" + ? "Paste or type your code" : "Description of issue" } /> +
+ {codeError ? ( +

{codeError}

+ ) : ( + <> + )} +
) : ( <> @@ -80,7 +94,7 @@ const ConfirmModal = ({