diff --git a/src/screens/HyperSwitch/Home/HomeUtils.res b/src/screens/HyperSwitch/Home/HomeUtils.res index 7eda29b8c..cc3b647ee 100644 --- a/src/screens/HyperSwitch/Home/HomeUtils.res +++ b/src/screens/HyperSwitch/Home/HomeUtils.res @@ -171,7 +171,12 @@ module CheckoutCard = { let (_authStatus, setAuthStatus) = React.useContext(AuthInfoProvider.authStatusContext) let {setIsSidebarExpanded} = React.useContext(SidebarProvider.defaultContext) let isPlayground = HSLocalStorage.getIsPlaygroundFromLocalStorage() - let isConfigureConnector = ListHooks.useListCount(~entityName=CONNECTOR) > 0 + let connectorList = + HyperswitchAtom.connectorListAtom + ->Recoil.useRecoilValueFromAtom + ->LogicUtils.safeParse + ->LogicUtils.getObjectArrayFromJson + let isConfigureConnector = connectorList->Array.length > 0 let urlPath = url.path->Belt.List.toArray->Js.Array2.joinWith("_") let handleOnClick = _ => { diff --git a/src/screens/HyperSwitch/Order/Orders.res b/src/screens/HyperSwitch/Order/Orders.res index 4245e47c6..1757eeeec 100644 --- a/src/screens/HyperSwitch/Order/Orders.res +++ b/src/screens/HyperSwitch/Order/Orders.res @@ -11,7 +11,13 @@ let make = (~previewOnly=false) => { let (searchText, setSearchText) = React.useState(_ => "") let (filters, setFilters) = React.useState(_ => None) let (paymentModal, setPaymentModal) = React.useState(_ => false) - let isConfigureConnector = ListHooks.useListCount(~entityName=CONNECTOR) > 0 + let connectorList = + HyperswitchAtom.connectorListAtom + ->Recoil.useRecoilValueFromAtom + ->LogicUtils.safeParse + ->LogicUtils.getObjectArrayFromJson + let isConfigureConnector = connectorList->Array.length > 0 + let (widthClass, heightClass) = React.useMemo1(() => { previewOnly ? ("w-full", "max-h-96") : ("w-full", "") }, [previewOnly]) diff --git a/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res b/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res index ad54c171b..86933d241 100644 --- a/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res +++ b/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res @@ -93,7 +93,10 @@ module AddEntryBtn = { buttonSize=Small buttonType={Primary} rightIcon={FontAwesome("plus")} - onClick={_ => setShowModal(_ => true)} + onClick={_ => { + setModalState(_ => Edit) + setShowModal(_ => true) + }} />