0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-16 08:51:32 -05:00

Add event for A/B test first state project (#5791)

This commit is contained in:
Marina López 2025-02-07 09:51:25 +01:00 committed by GitHub
parent a4e35ec713
commit 5fa96315e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,19 +8,29 @@
(:require-macros [app.main.style :as stl])
(:require
[app.config :as cf]
[app.main.data.event :as ev]
[app.main.store :as st]
[app.main.ui.dashboard.import :as udi]
[app.main.ui.ds.product.empty-placeholder :refer [empty-placeholder*]]
[app.main.ui.ds.product.loader :refer [loader*]]
[app.main.ui.icons :as i]
[app.util.dom :as dom]
[app.util.i18n :as i18n :refer [tr]]
[potok.v2.core :as ptk]
[rumext.v2 :as mf]))
(mf/defc empty-placeholder-projects*
{::mf/wrap-props false}
[{:keys [on-create on-finish-import project-id] :as props}]
(let [file-input (mf/use-ref nil)
on-add-library (mf/use-fn #(dom/open-new-window "https://penpot.app/penpothub/libraries-templates"))
on-add-library (mf/use-fn
(fn [event]
(dom/prevent-default event)
(dom/stop-propagation event)
(st/emit! (ptk/event ::ev/event {::ev/name "explore-libraries-click"
::ev/origin "dashboard"
:section "empty-placeholder-projects"}))
(dom/open-new-window "https://penpot.app/penpothub/libraries-templates")))
on-import-files (mf/use-fn #(dom/click (mf/ref-val file-input)))]
[:div {:class (stl/css :empty-project-container)}