🎉 Add usage quotes

This commit is contained in:
Andrey Antukh 2022-12-27 20:04:41 +01:00
parent 941aa6ad5d
commit 73a3e0c0ae
20 changed files with 914 additions and 68 deletions

View file

@ -173,20 +173,18 @@
(cond
(= :feature-mismatch code)
(let [message (tr "errors.feature-mismatch" (:feature error))]
(st/emit! (modal/show
{:type :alert
:message message
:on-accept #(prn "kaka")})))
(st/emit! (modal/show {:type :alert :message message})))
(= :features-not-supported code)
(let [message (tr "errors.feature-not-supported" (:feature error))]
(st/emit! (modal/show
{:type :alert
:message message
:on-accept #(prn "kaka")})))
(st/emit! (modal/show {:type :alert :message message})))
(= :max-quote-reached code)
(let [message (tr "errors.max-quote-reached" (:target error))]
(st/emit! (modal/show {:type :alert :message message})))
:else
(ptk/handle-error (assoc error :type :server-error))))
(ptk/handle-error {:type :server-error :data error})))
;; This happens when the backed server fails to process the
;; request. This can be caused by an internal assertion or any other