mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
🐛 Fix incorrect error reporting on clone template error
This commit is contained in:
parent
78260fbc42
commit
f01cad9ce7
2 changed files with 10 additions and 11 deletions
|
@ -351,17 +351,15 @@
|
|||
|
||||
on-template-cloned-success
|
||||
(fn []
|
||||
(swap! state
|
||||
(fn [state]
|
||||
(-> state
|
||||
(assoc :status :importing :importing-templates 0))))
|
||||
(swap! state assoc :status :importing :importing-templates 0)
|
||||
(st/emit! (dd/fetch-recent-files)))
|
||||
|
||||
on-template-cloned-error
|
||||
(fn [cause]
|
||||
(errors/print-cause! "Template Clone Error" cause)
|
||||
(st/emit! (modal/hide)
|
||||
(msg/error (tr "dashboard.libraries-and-templates.import-error"))))
|
||||
(swap! state assoc :status :error :importing-templates 0)
|
||||
(errors/print-error! cause)
|
||||
(rx/of (modal/hide)
|
||||
(msg/error (tr "dashboard.libraries-and-templates.import-error"))))
|
||||
|
||||
continue-files
|
||||
(fn []
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
[app.main.data.messages :as msg]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.users :as du]
|
||||
[app.main.errors :as errors]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.context :as ctx]
|
||||
|
@ -138,10 +139,10 @@
|
|||
|
||||
on-template-cloned-error
|
||||
(mf/use-fn
|
||||
(fn []
|
||||
(swap! state #(assoc % :status :waiting))
|
||||
(st/emit!
|
||||
(msg/error (tr "dashboard.libraries-and-templates.import-error")))))
|
||||
(fn [cause]
|
||||
(swap! state assoc :status :error)
|
||||
(errors/print-error! cause)
|
||||
(st/emit! (msg/error (tr "dashboard.libraries-and-templates.import-error")))))
|
||||
|
||||
download-tutorial
|
||||
(mf/use-fn
|
||||
|
|
Loading…
Add table
Reference in a new issue