0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-20 05:34:23 -05:00

🐛 Fix token deletion

This commit is contained in:
Florian Schroedl 2024-11-20 16:03:54 +01:00
parent 9819239d58
commit 75a044e453
2 changed files with 3 additions and 2 deletions

View file

@ -8,6 +8,7 @@
(:require-macros [app.main.style :as stl])
(:require
[app.common.data :as d]
[app.common.types.tokens-lib :as ctob]
[app.main.data.modal :as modal]
[app.main.data.tokens :as dt]
[app.main.refs :as refs]
@ -206,7 +207,7 @@
(defn default-actions [{:keys [token selected-token-set-id]}]
(let [{:keys [modal]} (wtty/get-token-properties token)]
[{:title "Delete Token"
:action #(st/emit! (dt/delete-token selected-token-set-id (:name token)))}
:action #(st/emit! (dt/delete-token (ctob/set-path->set-name selected-token-set-id) (:name token)))}
{:title "Duplicate Token"
:action #(st/emit! (dt/duplicate-token (:name token)))}
{:title "Edit Token"

View file

@ -348,7 +348,7 @@ Token names should only contain letters and digits separated by . characters.")}
(fn [e]
(dom/prevent-default e)
(modal/hide!)
(st/emit! (dt/delete-token selected-token-set-id (:name token)))))
(st/emit! (dt/delete-token (ctob/set-path->set-name selected-token-set-id) (:name token)))))
on-cancel
(mf/use-fn