Skip to content

Commit

Permalink
fix: changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Jan 18, 2024
1 parent f91b629 commit 5fbc5fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/Button.res
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ let make = (
? "min-w-min"
: ""} ${customBackColor->Option.getWithDefault(
backColor,
)} ${customRoundedClass->Belt.Option.getWithDefault(roundedClass)}`
)} ${customRoundedClass->Option.getWithDefault(roundedClass)}`
let customJustifyStyle = customButtonStyle->String.includes("justify") ? "" : "justify-center"

<UIUtils.RenderIf condition={access !== AuthTypes.NoAccess}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,16 +528,14 @@ module SaveAndActivateButton = {
try {
let onSubmitResponse = await onSubmit(formState.values, false)
let currentActivatedFromJson =
onSubmitResponse->Js.Nullable.toOption->Belt.Option.getWithDefault(Js.Json.null)
onSubmitResponse->Js.Nullable.toOption->Option.getWithDefault(Js.Json.null)
let currentActivatedId =
currentActivatedFromJson->LogicUtils.getDictFromJsonObject->LogicUtils.getString("id", "")
let _ = await handleActivateConfiguration(Some(currentActivatedId))
} catch {
| Js.Exn.Error(e) =>
let _err =
Js.Exn.message(e)->Belt.Option.getWithDefault(
"Failed to save and activate configuration!",
)
Js.Exn.message(e)->Option.getWithDefault("Failed to save and activate configuration!")
}
}
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/utils/PromiseUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let allSettledPolyfill = (arr: array<promise<Js.Json.t>>) => {
->Promise.catch(err => {
switch err {
| Js.Exn.Error(e) =>
let err = Js.Exn.message(e)->Belt.Option.getWithDefault("Failed to Fetch!")
let err = Js.Exn.message(e)->Option.getWithDefault("Failed to Fetch!")
err->Js.Json.string
| _ => Js.Json.null
}->Promise.resolve
Expand Down

0 comments on commit 5fbc5fd

Please sign in to comment.