Skip to content

Commit

Permalink
feat: Resend Invite Removal (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja authored Dec 20, 2023
1 parent ffc819e commit 3551622
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/screens/HyperSwitch/APIUtils/APIUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ let getURL = (
| #INVITE
| #RESEND_INVITE =>
`${userUrl}/user/${(userType :> string)->Js.String2.toLowerCase}`

| #SWITCH_MERCHANT =>
switch methodType {
| Get => `${userUrl}/switch/list`
Expand Down
18 changes: 9 additions & 9 deletions src/screens/HyperSwitch/UserManagement/ShowUserData.res
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module UserHeading = {
let updateDetails = useUpdateMethod()
let status = infoValue.status->UserRoleEntity.statusToVariantMapper

let resendInvite = async () => {
let _resendInvite = async () => {
try {
let url = getURL(~entityName=USERS, ~userType=#RESEND_INVITE, ~methodType=Post, ())
let body = [("user_id", userId->Js.Json.string)]->Js.Dict.fromArray->Js.Json.object_
Expand All @@ -38,14 +38,14 @@ module UserHeading = {
| _ => infoValue.status->Js.String2.toUpperCase->React.string
}}
</div>
<UIUtils.RenderIf condition={status !== Active}>
<Button
text="Resend Invite"
buttonType={SecondaryFilled}
customButtonStyle="!px-2"
onClick={_ => resendInvite()->ignore}
/>
</UIUtils.RenderIf>
// <UIUtils.RenderIf condition={status !== Active}>
// <Button
// text="Resend Invite"
// buttonType={SecondaryFilled}
// customButtonStyle="!px-2"
// onClick={_ => resendInvite()->ignore}
// />
// </UIUtils.RenderIf>
</div>
</div>
}
Expand Down

0 comments on commit 3551622

Please sign in to comment.