fixed warnings.

This commit is contained in:
2022-07-26 05:56:41 -07:00
parent f6f73a6110
commit 96c80853ef
133 changed files with 670 additions and 1640 deletions

View File

@@ -1,10 +1,8 @@
(ns auto-ap.views.components.modal
(:require [re-frame.core :as re-frame]
[reagent.core :as r]
[auto-ap.events :as events]
[auto-ap.subs :as subs]
[auto-ap.status :as status]
[auto-ap.views.utils :refer [with-keys appearing dispatch-event]]))
(:require
[auto-ap.status :as status]
[auto-ap.views.utils :refer [appearing dispatch-event]]
[re-frame.core :as re-frame]))
(re-frame/reg-sub
::modal-state
@@ -18,7 +16,7 @@
(re-frame/reg-event-fx
::modal-closed
(fn [{:keys [db]} [_ state]]
(fn [{:keys [db]} [_ _]]
(let [[_ status-id] (some-> db ::state :confirm :status-from )]
(cond-> {:db (dissoc db ::state)}
status-id (assoc :dispatch [::status/completed status-id])))))
@@ -27,7 +25,7 @@
(defn global-modal []
(let [state (re-frame/subscribe [::modal-state])]
(fn []
(if (:visible? @state)
(when (:visible? @state)
(let [{:keys [title body status-from foot class cancel? confirm]} @state]
[:div.modal.is-active (cond-> {}
class (assoc :class class))