0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

Merge pull request #4259 from penpot/alotor-fix-update-profile

🐛 Fix problem with language update
This commit is contained in:
Eva Marco 2024-03-13 10:00:55 +01:00 committed by GitHub
commit 4c0e17ea7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,12 +24,16 @@
(s/def ::options-form
(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
[form _event]
(let [data (:clean-data @form)]
(st/emit! (du/update-profile data)
(du/persist-profile)
(msg/success (tr "notifications.profile-saved")))))
(du/persist-profile {:on-success on-success}))))
(mf/defc options-form
{::mf/wrap-props false}