Skip to content

Commit

Permalink
Fix error-modal code-formatted parts
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Jan 23, 2025
1 parent 86b6091 commit c1fb0f2
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions src/re_com/error_modal.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,6 @@
arrow-points (str arrow-midpoint "," arrow-midpoint " "
arrow-side-length "," 0 " "
"0,0")
error (cond
(string? error)
(fn [props] [:div props error])
(map? error)
(fn [props] [:div props (pr-str error)])
:else
error)
context (cond
(string? context)
(fn [props] [:div props context])
(map? context)
(fn [props] [:div props (pr-str context)])
:else
context)
details (if (string? details)
(fn [props] [:div props details]) details)
what-happened (or what-happened
(when defaults?
[:span "Your app encountered an unexpected error. "
Expand Down Expand Up @@ -228,13 +212,13 @@
:props
{:children
[(when details
(part (pr-str details)
(part details
{:part ::details}))
(when error
(part (pr-str error)
(part error
{:part ::error}))
(when context
(part (pr-str context)
(part context
{:part ::context}))]}})])
(when footer
(part footer
Expand Down

0 comments on commit c1fb0f2

Please sign in to comment.