mirror of
https://github.com/penpot/penpot.git
synced 2025-01-20 13:42:59 -05:00
🐛 Fix token deletion
This commit is contained in:
parent
9819239d58
commit
75a044e453
2 changed files with 3 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue