This commit is contained in:
Kenneth Jannette
2024-03-23 03:13:30 -05:00
parent b77ee96743
commit f8e2f5cea6
2 changed files with 9 additions and 4 deletions

View File

@@ -456,7 +456,7 @@ const HomePage = () => {
</section>
{showPromoModal ? (
<ConfirmModal
titleText="Enter Promo Code"
titleText="Enter Code"
onCancel={handleCancelModal}
buttonLabelText="Enter Code"
isPromoModal={true}

View File

@@ -24,7 +24,12 @@ const ConfirmModal = ({
}) => {
const [inputValue, setInputValue] = useState("");
const title = titleText ? titleText : "Confirmation";
const handleConfirm = (code) => {
if (!code) {
return;
}
onConfirm(code);
};
return (
<Modal show="true" onHide={onCancel} size="lg">
<Modal.Header closeButton>
@@ -61,7 +66,7 @@ const ConfirmModal = ({
inputValue
? ""
: isPromoModal
? "Enter your promotional code"
? "Paste or type your code"
: "Description of issue"
}
/>
@@ -80,7 +85,7 @@ const ConfirmModal = ({
<Button
disabled={isBusy}
className="primary-button"
onClick={() => onConfirm(inputValue)}
onClick={() => handleConfirm(inputValue)}
labelText={buttonLabelText}
/>
</Modal.Footer>