more
This commit is contained in:
@@ -456,7 +456,7 @@ const HomePage = () => {
|
||||
</section>
|
||||
{showPromoModal ? (
|
||||
<ConfirmModal
|
||||
titleText="Enter Promo Code"
|
||||
titleText="Enter Code"
|
||||
onCancel={handleCancelModal}
|
||||
buttonLabelText="Enter Code"
|
||||
isPromoModal={true}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user