Skip to content

Commit

Permalink
fix: code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhiagrawal001 committed Jan 24, 2024
1 parent eb785b4 commit ecd689f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ let make = (~connector, ~isUpdateFlow, ~setInitialValues, ~initialValues, ~setCu
let handleStateToNextPage = () => {
setCurrentStep(_ => ConnectorTypes.PaymentMethods)
}
let getStatus = async () => {
let getStatus = React.useCallback0(async () => {
open PayPalFlowUtils
try {
setScreenState(_ => PageLoaderWrapper.Loading)
Expand Down Expand Up @@ -371,7 +371,7 @@ let make = (~connector, ~isUpdateFlow, ~setInitialValues, ~initialValues, ~setCu
// TODO: check error cases
| _ => setScreenState(_ => PageLoaderWrapper.Error(""))
}
}
})

React.useEffect0(() => {
if isRedirectedFromPaypalModal {
Expand Down
1 change: 1 addition & 0 deletions src/screens/HyperSwitch/Connectors/ConnectorPreview.res
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ let make = (
| _ => setScreenState(_ => PageLoaderWrapper.Error(""))
}
}

let connectorStatusStyle = connectorStatus =>
switch connectorStatus {
| false => "border bg-green-600 bg-opacity-40 border-green-700 text-green-800"
Expand Down

0 comments on commit ecd689f

Please sign in to comment.