Skip to content

Commit

Permalink
Fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mk committed Oct 8, 2024
1 parent 2fb131f commit 2d362e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
31 changes: 15 additions & 16 deletions src/nextjournal/clerk/render.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -584,22 +584,21 @@
[body-fn* @!presented-value]]))

(defn render-errors-overlay [errors]
(let [!expanded-at (r/atom {})]
[:div.fixed.bottom-0.left-0.font-mono.w-screen.z-20
[:div.text-4xl.absolute.left-1
{:style {:transform "rotate(-15deg)"
:text-shadow "0 2px 5px rgba(0,0,0,.1)"
:z-index 1
:top -5}}
(rand-nth ["😩" "😬" "😑" "😖"])]
[:div.flex.ml-7
[:div.pl-4.pr-3.pt-1.rounded-t.bg-red-100.text-red-600.text-sm.font-bold.relative.border-t.border-l.border-r.border-red-200
{:style {:bottom -1}}
"Render Errors"]]
(into [:div]
(map (fn [e]
[throwable-view e]))
errors)]))
[:div.fixed.bottom-0.left-0.font-mono.w-screen.z-20
[:div.text-4xl.absolute.left-1
{:style {:transform "rotate(-15deg)"
:text-shadow "0 2px 5px rgba(0,0,0,.1)"
:z-index 1
:top -5}}
(rand-nth ["😩" "😬" "😑" "😖"])]
[:div.flex.ml-7
[:div.pl-4.pr-3.pt-1.rounded-t.bg-red-100.text-red-600.text-sm.font-bold.relative.border-t.border-l.border-r.border-red-200
{:style {:bottom -1}}
"Render Errors"]]
(into [:div]
(map (fn [e]
[throwable-view e]))
errors)])

(defn clojure-exception-overlay [presented-value]
(let [!expanded-at (r/atom {})]
Expand Down
2 changes: 1 addition & 1 deletion src/nextjournal/clerk/sci_env.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
(try (*eval* form)
(catch js/Error e
(js/console.error "error in viewer-eval" e form)
(swap! render/!render-errors conj (Throwable->map e))
(swap! render/!render-errors conj #_:clj-kondo/ignore (Throwable->map e))
e)))

(defn ordered-map-reader-cljs [coll]
Expand Down

0 comments on commit 2d362e1

Please sign in to comment.