mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 11:18:33 +02:00
Show proper fallback avatar when no photo is available.
This commit is contained in:
parent
c117476681
commit
283c3277fa
2 changed files with 2 additions and 3 deletions
|
@ -130,7 +130,7 @@
|
||||||
(rs/emit! (udu/update-photo file))
|
(rs/emit! (udu/update-photo file))
|
||||||
(dom/clean-value! target)))]
|
(dom/clean-value! target)))]
|
||||||
(let [{:keys [photo]} (rum/react profile-l)
|
(let [{:keys [photo]} (rum/react profile-l)
|
||||||
photo (if (str/empty? photo)
|
photo (if (or (str/empty? photo) (nil? photo))
|
||||||
"images/avatar.jpg"
|
"images/avatar.jpg"
|
||||||
photo)]
|
photo)]
|
||||||
(html
|
(html
|
||||||
|
|
|
@ -58,10 +58,9 @@
|
||||||
[own]
|
[own]
|
||||||
(let [profile (rum/react profile-l)
|
(let [profile (rum/react profile-l)
|
||||||
local (:rum/local own)
|
local (:rum/local own)
|
||||||
photo (if (str/empty? (:photo profile))
|
photo (if (str/empty? (:photo profile ""))
|
||||||
"/images/avatar.jpg"
|
"/images/avatar.jpg"
|
||||||
(:photo profile))]
|
(:photo profile))]
|
||||||
|
|
||||||
(html
|
(html
|
||||||
[:div.user-zone {:on-mouse-enter #(swap! local assoc :open true)
|
[:div.user-zone {:on-mouse-enter #(swap! local assoc :open true)
|
||||||
:on-mouse-leave #(swap! local assoc :open false)}
|
:on-mouse-leave #(swap! local assoc :open false)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue