mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 08:36:37 +02:00
🐛 Fix problem with language update
This commit is contained in:
parent
946677f5b3
commit
d4fb85bb02
1 changed files with 6 additions and 2 deletions
|
@ -24,12 +24,16 @@
|
||||||
(s/def ::options-form
|
(s/def ::options-form
|
||||||
(s/keys :opt-un [::lang ::theme]))
|
(s/keys :opt-un [::lang ::theme]))
|
||||||
|
|
||||||
|
(defn- on-success
|
||||||
|
[profile]
|
||||||
|
(st/emit! (msg/success (tr "notifications.profile-saved"))
|
||||||
|
(du/profile-fetched profile)))
|
||||||
|
|
||||||
(defn- on-submit
|
(defn- on-submit
|
||||||
[form _event]
|
[form _event]
|
||||||
(let [data (:clean-data @form)]
|
(let [data (:clean-data @form)]
|
||||||
(st/emit! (du/update-profile data)
|
(st/emit! (du/update-profile data)
|
||||||
(du/persist-profile)
|
(du/persist-profile {:on-success on-success}))))
|
||||||
(msg/success (tr "notifications.profile-saved")))))
|
|
||||||
|
|
||||||
(mf/defc options-form
|
(mf/defc options-form
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue