mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 08:09:14 -05:00
Merge pull request #5381 from penpot/niwinz-bugfix-1
🐛 Fix incorrect thumbnail rendering on dashboard
This commit is contained in:
commit
e3d2b99acc
3 changed files with 2 additions and 7 deletions
|
@ -698,11 +698,7 @@
|
||||||
|
|
||||||
(defn get-team-recent-files
|
(defn get-team-recent-files
|
||||||
[conn team-id]
|
[conn team-id]
|
||||||
(->> (db/exec! conn [sql:team-recent-files team-id])
|
(db/exec! conn [sql:team-recent-files team-id]))
|
||||||
(mapv (fn [row]
|
|
||||||
(if-let [media-id (:thumbnail-id row)]
|
|
||||||
(assoc row :thumbnail-uri (resolve-public-uri media-id))
|
|
||||||
(dissoc row :media-id))))))
|
|
||||||
|
|
||||||
(def ^:private schema:get-team-recent-files
|
(def ^:private schema:get-team-recent-files
|
||||||
[:map {:title "get-team-recent-files"}
|
[:map {:title "get-team-recent-files"}
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
[{:keys [shape]}]
|
[{:keys [shape]}]
|
||||||
(let [thumbnails? (mf/use-ctx muc/render-thumbnails)
|
(let [thumbnails? (mf/use-ctx muc/render-thumbnails)
|
||||||
childs (mapv (d/getf objects) (:shapes shape))]
|
childs (mapv (d/getf objects) (:shapes shape))]
|
||||||
(if (and thumbnails? (some? (:thumbnail shape)))
|
(if (and thumbnails? (some? (:thumbnail-id shape)))
|
||||||
[:& frame/frame-thumbnail {:shape shape :bounds (:children-bounds shape)}]
|
[:& frame/frame-thumbnail {:shape shape :bounds (:children-bounds shape)}]
|
||||||
[:& frame-shape {:shape shape :childs childs}])))))
|
[:& frame-shape {:shape shape :childs childs}])))))
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
(mf/defc frame-container
|
(mf/defc frame-container
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
|
|
||||||
(let [shape (unchecked-get props "shape")
|
(let [shape (unchecked-get props "shape")
|
||||||
children (unchecked-get props "children")
|
children (unchecked-get props "children")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue