Consolidate templates new order and naming

This commit is contained in:
Pablo Alba 2024-07-24 09:12:28 +02:00
parent a457f8baf5
commit 81bd30a11b
3 changed files with 19 additions and 27 deletions

View file

@ -299,19 +299,7 @@
(ptk/reify ::libraries-fetched
ptk/UpdateEvent
(update [_ state]
(let [templates-a-b-test? (cf/external-feature-flag "dashboard-01" "test")
remove-ids (if templates-a-b-test?
#{"wireframing-kit" "prototype-examples" "plants-app" "penpot-design-system"}
#{"prototype-examples" "penpot-design-system"})
libraries (cond->> libraries
:always
(remove #(contains? remove-ids (:id %)))
templates-a-b-test?
(concat [{:id "wireframing-kit", :name "Wireframe library"}
{:id "prototype-examples", :name "Prototype template"}
{:id "plants-app", :name "UI mockup example"}
{:id "penpot-design-system", :name "Design system example"}]))]
(assoc state :builtin-templates libraries)))))
(assoc state :builtin-templates libraries))))
(defn fetch-builtin-templates
[]