more
This commit is contained in:
@@ -456,7 +456,7 @@ const HomePage = () => {
|
|||||||
</section>
|
</section>
|
||||||
{showPromoModal ? (
|
{showPromoModal ? (
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
titleText="Enter Promo Code"
|
titleText="Enter Code"
|
||||||
onCancel={handleCancelModal}
|
onCancel={handleCancelModal}
|
||||||
buttonLabelText="Enter Code"
|
buttonLabelText="Enter Code"
|
||||||
isPromoModal={true}
|
isPromoModal={true}
|
||||||
|
|||||||
@@ -24,7 +24,12 @@ const ConfirmModal = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const [inputValue, setInputValue] = useState("");
|
const [inputValue, setInputValue] = useState("");
|
||||||
const title = titleText ? titleText : "Confirmation";
|
const title = titleText ? titleText : "Confirmation";
|
||||||
|
const handleConfirm = (code) => {
|
||||||
|
if (!code) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
onConfirm(code);
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<Modal show="true" onHide={onCancel} size="lg">
|
<Modal show="true" onHide={onCancel} size="lg">
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
@@ -61,7 +66,7 @@ const ConfirmModal = ({
|
|||||||
inputValue
|
inputValue
|
||||||
? ""
|
? ""
|
||||||
: isPromoModal
|
: isPromoModal
|
||||||
? "Enter your promotional code"
|
? "Paste or type your code"
|
||||||
: "Description of issue"
|
: "Description of issue"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@@ -80,7 +85,7 @@ const ConfirmModal = ({
|
|||||||
<Button
|
<Button
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
className="primary-button"
|
className="primary-button"
|
||||||
onClick={() => onConfirm(inputValue)}
|
onClick={() => handleConfirm(inputValue)}
|
||||||
labelText={buttonLabelText}
|
labelText={buttonLabelText}
|
||||||
/>
|
/>
|
||||||
</Modal.Footer>
|
</Modal.Footer>
|
||||||
|
|||||||
Reference in New Issue
Block a user