Skip to content

Commit

Permalink
chore: switch merchant name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitanjli Chopra authored and Gitanjli Chopra committed Jan 6, 2025
1 parent 800d97f commit 3ddcdae
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/screens/OMPSwitch/MerchantSwitch.res
Original file line number Diff line number Diff line change
Expand Up @@ -183,20 +183,19 @@ let make = () => {
let customScrollStyle = "max-h-72 overflow-scroll px-1 pt-1 border border-b-0"
let dropdownContainerStyle = "rounded-md border border-1 w-[15rem]"

let subHeading = {currentOMPName(merchantList, merchantId)}

React.useEffect(() => {
getMerchantList()->ignore
if subHeading != merchantDetailsTypedValue.merchant_name->Option.getOr("") {
getMerchantList()->ignore
}
None
}, [])
}, [merchantDetailsTypedValue.merchant_name])

let toggleChevronState = () => {
setArrow(prev => !prev)
}

let subHeading =
merchantDetailsTypedValue.merchant_name->Option.isNone
? currentOMPName(merchantList, merchantId)
: merchantDetailsTypedValue.merchant_name->Option.getOr("")

<div className="w-fit">
<SelectBox.BaseDropdown
allowMultiSelect=false
Expand Down

0 comments on commit 3ddcdae

Please sign in to comment.