Skip to content

Commit

Permalink
fix: text change
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhiagrawal001 committed Jan 17, 2024
1 parent 83f9696 commit 486de72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ let make = (~userRole, ~isAddMerchantEnabled=false) => {
} else {
<>
<ExternalUser switchMerchant isAddMerchantEnabled />
<LoaderModal showModal={successModal} setShowModal={setSuccessModal} text="Switch Merchant" />
<LoaderModal
showModal={successModal} setShowModal={setSuccessModal} text="Switching merchant..."
/>
</>
}
}
4 changes: 2 additions & 2 deletions src/screens/HyperSwitch/UserManagement/InviteUsers.res
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let make = () => {
let role = valDict->getStrArray("roleType")->LogicUtils.getValueFromArray(0, "")
let emailPasswordsArray = []

let arryPromises =
let arrayOfPromises =
valDict
->getStrArray("emailList")
->Array.map(ele => {
Expand All @@ -133,7 +133,7 @@ let make = () => {
inviteUserReq(body, emailPasswordsArray)
})

let _ = await PromiseUtils.allSettledPolyfill(arryPromises)
let _ = await PromiseUtils.allSettledPolyfill(arrayOfPromises)

showToast(
~message=magicLink
Expand Down
3 changes: 3 additions & 0 deletions src/utils/PromiseUtils.res
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Pollyfill for Promise.allSettled()
// Promise.allSettled() takes an iterable of promises and returns a single promise that is fulfilled with an array of promise settlement result

let allSettledPolyfill = (arr: array<promise<unit>>) => {
let res = arr->Array.map(promise =>
promise->Promise.then(val => {
Expand Down

0 comments on commit 486de72

Please sign in to comment.