0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

Show proper fallback avatar when no photo is available.

This commit is contained in:
Andrey Antukh 2016-05-28 13:45:35 +03:00
parent c117476681
commit 283c3277fa
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
2 changed files with 2 additions and 3 deletions

View file

@ -130,7 +130,7 @@
(rs/emit! (udu/update-photo file))
(dom/clean-value! target)))]
(let [{:keys [photo]} (rum/react profile-l)
photo (if (str/empty? photo)
photo (if (or (str/empty? photo) (nil? photo))
"images/avatar.jpg"
photo)]
(html

View file

@ -58,10 +58,9 @@
[own]
(let [profile (rum/react profile-l)
local (:rum/local own)
photo (if (str/empty? (:photo profile))
photo (if (str/empty? (:photo profile ""))
"/images/avatar.jpg"
(:photo profile))]
(html
[:div.user-zone {:on-mouse-enter #(swap! local assoc :open true)
:on-mouse-leave #(swap! local assoc :open false)}