Skip to content

Commit

Permalink
chore: minor modification for enhancement and bugfix (#1815)
Browse files Browse the repository at this point in the history
Co-authored-by: Gitanjli Chopra <[email protected]>
  • Loading branch information
gitanjli525 and Gitanjli Chopra authored Nov 28, 2024
1 parent 7021b4d commit 491271f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/screens/SDKPayment/SDKPage.res
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module SDKConfiguarationFields = {
let businessProfiles = Recoil.useRecoilValueFromAtom(HyperswitchAtom.businessProfilesAtom)
let disableSelectionForProfile = businessProfiles->HomeUtils.isDefaultBusinessProfile
let connectorList = HyperswitchAtom.connectorListAtom->Recoil.useRecoilValueFromAtom
let paymentConnectorList =
connectorList->RoutingUtils.filterConnectorList(~retainInList=PaymentConnector)
let dropDownOptions = HomeUtils.countries->Array.map((item): SelectBox.dropdownOption => {
{
label: `${item.countryName} (${item.currency})`,
Expand Down Expand Up @@ -66,7 +68,7 @@ module SDKConfiguarationFields = {
<FormRenderer.SubmitButton
text="Show preview"
disabledParamter={initialValues.profile_id->LogicUtils.isEmptyString ||
connectorList->Array.length <= 0}
paymentConnectorList->Array.length <= 0}
customSumbitButtonStyle="!mt-5"
/>
</div>
Expand All @@ -87,7 +89,7 @@ let make = () => {
)
let connectorList = HyperswitchAtom.connectorListAtom->Recoil.useRecoilValueFromAtom

let filterConnectorList =
let paymentConnectorList =
connectorList->RoutingUtils.filterConnectorList(~retainInList=PaymentConnector)

React.useEffect(() => {
Expand Down Expand Up @@ -157,7 +159,7 @@ let make = () => {
initialValues
/>
</div>
} else if filterConnectorList->Array.length <= 0 {
} else if paymentConnectorList->Array.length <= 0 {
<HelperComponents.BluredTableComponent
infoText={"Connect to a payment processor to make your first payment"}
buttonText={"Connect a connector"}
Expand Down

0 comments on commit 491271f

Please sign in to comment.