Skip to content

Commit

Permalink
Fix react issue
Browse files Browse the repository at this point in the history
  • Loading branch information
skydread1 committed Dec 19, 2023
1 parent 2300c3e commit bdfcff7
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/loicb/client/core/dom/page.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,15 @@

(defn vignette-link
"Vignette link to a portfolio project article."
[{:post/keys [articles date employer image md-content-short repos tags title]}]
[{:post/keys [articles date employer image md-content-short repos tags title]} link-params]
(let [{:image/keys [src src-dark alt]} image
src (if (= :dark @(rf/subscribe [:subs/pattern '{:app/theme ?x}]))
src-dark src)]
[:<>
[:h2 title]
[:h2
(internal-link
title
link-params)]
[:h5.info
(str date " | " (if employer employer "Personal Project"))]
(when src
Expand Down Expand Up @@ -126,17 +129,17 @@
[:div.simple-link
{:key (str "simple-link-" id)
:id (str "simple-link-" id)
:class css-class}
:class (str "simple-link-" css-class)}
[simple-link post]]
link-params)
[:div.vignette-container
(internal-link
[:div.vignette
{:key (str "vignette-link-" id)
:id (str "vignette-link-" id)
:class css-class}
[vignette-link post]]
link-params)]))
{:key (str "vignette-container-" id)
:id (str "vignette-container-" id)}
[:div.vignette
{:key (str "vignette-link-" id)
:id (str "vignette-link-" id)
:class (str "vignette-link-" css-class)}
[vignette-link post link-params]]]))

(defn page-with-post-links
"Page with post links."
Expand Down

0 comments on commit bdfcff7

Please sign in to comment.