0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-01 11:59:17 -05:00

Next commit

This commit is contained in:
Akshay Gupta 2024-08-07 00:57:13 +05:30
parent 22e497398f
commit 02a19a6b33
No known key found for this signature in database

View file

@ -31,10 +31,13 @@
#uuid "0381446e-1f1d-423f-912c-ab577d61b79b" {:type :set
:name "Set Root 2"}})
(defn render-set [set-id]
(mf/defc render-set
[{:keys [set-id]}]
(println "Rendering set with ID:" set-id)
(let [set (get sets set-id)
{:keys [type name children]} set
(let [set (get sets set-id)]
(when set
(let [{:keys [type name children]} set
icon (if (= type :group) i/document i/document)] ;; Correct icon for groups
[:div {:class (stl/css-case :set-item true :group (= type :group))}
[:div {:class (stl/css :set-icon)} icon]
@ -44,7 +47,7 @@
(for [child-id children]
(do
(println "Rendering child ID:" child-id)
^{:key (str child-id)} [render-set child-id]))])]))
^{:key (str child-id)} [:& render-set {:key (str child-id):set-id child-id}]))])]))))
(mf/defc sets-list
{::mf/wrap-props false}