Skip to content

Commit

Permalink
fix: fixed klarnaInit undefined in submitCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
ArushKapoorJuspay committed May 30, 2024
1 parent 91cbedb commit 545943d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Payments/KlarnaSDK.res
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let make = (~sessionObj: SessionsType.token) => {
Utils.handlePostMessage([("fullscreen", false->JSON.Encode.bool)])
}

let submitCallback = (ev: Window.event) => {
let submitCallback = React.useCallback((ev: Window.event) => {
let json = ev.data->JSON.parseExn
let confirm = json->Utils.getDictFromJson->ConfirmType.itemToObjMapper

Expand All @@ -61,7 +61,7 @@ let make = (~sessionObj: SessionsType.token) => {
},
)
}
}
}, [status])
useSubmitPaymentData(submitCallback)

React.useEffect(() => {
Expand Down

0 comments on commit 545943d

Please sign in to comment.