Skip to content

Commit

Permalink
Merge branch 'main' into refactor/rescript-core-changes-json
Browse files Browse the repository at this point in the history
  • Loading branch information
seekshiva authored Mar 14, 2024
2 parents 5119046 + c31db69 commit 76eb6a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
File renamed without changes.
12 changes: 10 additions & 2 deletions src/Components/PayNowButton.res
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,26 @@ let make = (

let buttonText = sdkHandleConfirmPayment.buttonText->Option.getOr(localeString.payNowButton)

React.useEffect4(() => {
React.useEffect5(() => {
if showFields {
if selectedOption === Card {
setIsDisabled(_ => !validFormat)
} else {
setIsDisabled(_ => !areRequiredFieldsValidValue)
}
} else if !customerMethod.requiresCvv {
setIsDisabled(_ => customerMethod.requiresCvv)
} else {
setIsDisabled(_ => !isSavedMethodCheck)
}
None
}, (validFormat, areRequiredFieldsValidValue, selectedOption, isSavedMethodCheck))
}, (
validFormat,
areRequiredFieldsValidValue,
selectedOption,
isSavedMethodCheck,
customerMethod.requiresCvv,
))

<div className="flex flex-col gap-1 h-auto w-full items-center">
<button
Expand Down

0 comments on commit 76eb6a4

Please sign in to comment.