🐛 Fix "Publish empty library" modal appearing for non-empty libraries (#5838)

* 🐛 Fix 'Publish empty library' modal appearing for non-empty libraries

*  Add integration test for bug 10113
This commit is contained in:
Belén Albeza 2025-02-12 15:36:01 +01:00 committed by GitHub
parent fb0e22c16b
commit fb6cd3d9d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 261 additions and 9 deletions

View file

@ -176,15 +176,7 @@
(defn- empty-library?
"Check if currentt library summary has elements or not"
[summary]
(let [colors (or (-> summary :colors :count) 0)
components (or (-> summary :components :count) 0)
media (or (-> summary :media :count) 0)
typographies (or (-> summary :typographies :count) 0)]
(and (zero? colors)
(zero? components)
(zero? media)
(zero? typographies))))
(boolean (:is-empty summary)))
(mf/defc libraries-tab*
{::mf/props :obj