Skip to content

Commit

Permalink
finish the frontend of profile editing
Browse files Browse the repository at this point in the history
  • Loading branch information
humorless committed Aug 22, 2024
1 parent 2d51943 commit 4e4dc24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/co/gaiwan/compass/html/profiles.clj
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
(map-indexed
(fn [idx itm]
[row itm {:row-index idx}]) links))]]
[:input#rows-count {:type "hidden" :name "rows-count" :value 0}]
[:input#rows-count {:type "hidden" :name "rows-count" :value (count (queries/all-links (:db/id user)))}]
[:input#add-link {:type "button" :value "Add Links"
:hx-get (url-for :profile/add-link)
:hx-target "#links-block"
Expand Down
4 changes: 4 additions & 0 deletions src/co/gaiwan/compass/routes/profiles.clj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
:profile-link/user user-id
:profile-link/type type-val
:profile-link/href href-val}]
(tap> {:cond1 [link-id-val (private-profile-links link-id-val) (nil? private-link-val)]
:cond2 [link-id-val (nil? (private-profile-links link-id-val)) private-link-val]
:cond3 [link-id-val (public-profile-links link-id-val) (nil? public-link-val)]
:cond4 [link-id-val (nil? (public-profile-links link-id-val)) public-link-val]})
(cond-> [profile-data]
;; new profile-link
(and (nil? link-id-val) private-link-val)
Expand Down

0 comments on commit 4e4dc24

Please sign in to comment.