Skip to content

Commit

Permalink
Merge branch 'main' into promise-core-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja authored Mar 20, 2024
2 parents 311fa9e + 4cfb6f4 commit 104f587
Show file tree
Hide file tree
Showing 40 changed files with 196 additions and 131 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## [0.33.9](https://github.com/juspay/hyperswitch-web/compare/v0.33.8...v0.33.9) (2024-03-19)

## [0.33.8](https://github.com/juspay/hyperswitch-web/compare/v0.33.7...v0.33.8) (2024-03-18)


Expand Down
179 changes: 121 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orca-payment-page",
"version": "0.33.8",
"version": "0.33.9",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/App.res
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let make = () => {
log
})

React.useEffect1(() => {
React.useEffect(() => {
setLoggerState(_ => logger)
None
}, [logger])
Expand Down
4 changes: 2 additions & 2 deletions src/Components/AddressPaymentInput.res
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ let make = (~paymentType, ~className="") => {
}
}

React.useEffect2(() => {
React.useEffect(() => {
checkPostalValidity(postalCode, setPostalCode, regex)
None
}, (regex, country.value))

React.useEffect1(() => {
React.useEffect(() => {
setState(prev => {
...prev,
value: "",
Expand Down
2 changes: 1 addition & 1 deletion src/Components/BlikCodePaymentInput.res
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let make = () => {
})
}

React.useEffect1(() => {
React.useEffect(() => {
setblikCode(prev => {
...prev,
errorString: switch prev.isValid {
Expand Down
2 changes: 1 addition & 1 deletion src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let make = (
~cvcProps=None,
~isBancontact=false,
) => {
React.useEffect1(() => {
React.useEffect(() => {
setRequiredFieldsBody(_ => Dict.make())
None
}, [paymentMethodType])
Expand Down
2 changes: 1 addition & 1 deletion src/Components/EmailPaymentInput.res
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let make = (~paymentType) => {
})
}

React.useEffect1(() => {
React.useEffect(() => {
setEmail(prev => {
...prev,
errorString: switch prev.isValid {
Expand Down
4 changes: 2 additions & 2 deletions src/Components/InputField.res
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ let make = (
onBlur(ev)
Utils.handleOnBlurPostMessage(~targetOrigin=parentURL, ())
}
React.useEffect2(() => {
React.useEffect(() => {
if value->String.length > 0 {
setValidClasses()
}
Expand Down Expand Up @@ -105,7 +105,7 @@ let make = (

let concatString = Array.joinWith([cardEmpty, cardComplete, cardInvalid, cardFocused], "")

React.useEffect5(() => {
React.useEffect(() => {
Utils.handlePostMessage([
("id", iframeId->JSON.Encode.string),
("concatedString", concatString->JSON.Encode.string),
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Modal.res
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let make = (
}, 450)->ignore
}

React.useEffect1(() => {
React.useEffect(() => {
loader ? setOpenModal(_ => false) : setOpenModal(_ => true)
None
}, [loader])
Expand Down
2 changes: 1 addition & 1 deletion src/Components/PayNowButton.res
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let make = (

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

React.useEffect5(() => {
React.useEffect(() => {
if showFields {
if selectedOption === Card {
setIsDisabled(_ => !validFormat)
Expand Down
2 changes: 1 addition & 1 deletion src/Components/PaymentDropDownField.res
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let make = (
}
}
}
React.useEffect1(() => {
React.useEffect(() => {
let initialValue = options->Array.get(0)->Option.getOr("")
if (
value.value === "" ||
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SavedCardItem.res
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let make = (
| None => ()
}
}
React.useEffect1(() => {
React.useEffect(() => {
isActive ? focusCVC() : ()
None
}, [isActive])
Expand Down
2 changes: 1 addition & 1 deletion src/Hooks/CommonHooks.res
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ external dictToObj: Dict.t<'a> => {..} = "%identity"

let useScript = (src: string) => {
let (status, setStatus) = React.useState(_ => src != "" ? "loading" : "idle")
React.useEffect1(() => {
React.useEffect(() => {
if src == "" {
setStatus(_ => "idle")
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hooks/Fetcher.res
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type url = {pathname: pathname}
let useFetcher = fileName => {
let _url = RescriptReactRouter.useUrl()
let (optionalJson, setJson) = React.useState(() => None)
React.useEffect1(() => {
React.useEffect(() => {
open Promise
Fetch.get(`${hostname}/json/${fileName}.json`)
->then(Fetch.Response.json)
Expand Down
4 changes: 2 additions & 2 deletions src/Hooks/OutsideClick.res
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let useOutsideClick = (
) => {
let useEvent0 = callback => {
let callbackRef = React.useRef(callback)
React.useEffect1(() => {
React.useEffect(() => {
callbackRef.current = callback

None
Expand All @@ -26,7 +26,7 @@ let useOutsideClick = (
})
}
let eventCallback = useEvent0(callback)
React.useEffect1(() => {
React.useEffect(() => {
if isActive {
let handleClick = (e: ReactEvent.Mouse.t) => {
let targ = e->ReactEvent.Mouse.target
Expand Down
Loading

0 comments on commit 104f587

Please sign in to comment.