0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐛 Fix problem when importing in shared libraries

This commit is contained in:
alonso.torres 2021-11-25 13:01:19 +01:00 committed by Andrey Antukh
parent b9ccb4e52c
commit b68d721b39
3 changed files with 7 additions and 1 deletions

View file

@ -8,6 +8,7 @@
- Fix problems when exporting all artboards [Taiga #2234](https://tree.taiga.io/project/penpot/issue/2234).
- Fix problems with team management [#1353](https://github.com/penpot/penpot/issues/1353)
- Fix problem when importing in shared libraries [#1362](https://github.com/penpot/penpot/issues/1362)
### :arrow_up: Deps updates
### :heart: Community contributions by (Thank you!)

View file

@ -205,6 +205,7 @@
(mf/use-callback
(fn []
(st/emit! (dd/fetch-files {:project-id project-id})
(dd/fetch-shared-files)
(dd/clear-selected-files))))
import-files (use-import-file project-id on-finish-import)

View file

@ -6,6 +6,7 @@
(ns app.main.ui.dashboard.libraries
(:require
[app.common.data :as d]
[app.main.data.dashboard :as dd]
[app.main.refs :as refs]
[app.main.store :as st]
@ -17,6 +18,8 @@
(mf/defc libraries-page
[{:keys [team] :as props}]
(let [files-map (mf/deref refs/dashboard-shared-files)
projects (mf/deref refs/dashboard-projects)
default-project (->> projects vals (d/seek :is-default))
files (->> (vals files-map)
(sort-by :modified-at)
(reverse))]
@ -38,5 +41,6 @@
[:div.dashboard-title
[:h1 (tr "dashboard.libraries-title")]]]
[:section.dashboard-container
[:& grid {:files files}]]]))
[:& grid {:files files
:project default-project}]]]))