more
This commit is contained in:
@@ -23,9 +23,11 @@ const ConfirmModal = ({
|
|||||||
cancelButtonText,
|
cancelButtonText,
|
||||||
}) => {
|
}) => {
|
||||||
const [inputValue, setInputValue] = useState("");
|
const [inputValue, setInputValue] = useState("");
|
||||||
|
const [codeError, setCodeError] = useState("");
|
||||||
const title = titleText ? titleText : "Confirmation";
|
const title = titleText ? titleText : "Confirmation";
|
||||||
const handleConfirm = (code) => {
|
const handleConfirm = (code) => {
|
||||||
if (!code) {
|
if (!code) {
|
||||||
|
setCodeError("Please enter a code");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
onConfirm(code);
|
onConfirm(code);
|
||||||
@@ -70,6 +72,13 @@ const ConfirmModal = ({
|
|||||||
: "Description of issue"
|
: "Description of issue"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<div className="confirm-error-box">
|
||||||
|
{codeError ? (
|
||||||
|
<p className="confirm-error-text">{codeError}</p>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
|
|||||||
@@ -34,7 +34,14 @@
|
|||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.confirm-error-box {
|
||||||
|
margin-top: -6px;
|
||||||
|
}
|
||||||
|
.confirm-error-text {
|
||||||
|
font-size: 14px;
|
||||||
|
color: red;
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
.upload-header-bold {
|
.upload-header-bold {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user