Commit f2019a95 authored by Ricardo J. Mendez's avatar Ricardo J. Mendez

Replaced unnecessary uses of condp with case

Yeah, I keep forgetting `case` exists.
parent 641ea302
Pipeline #12795928 passed with stage
in 1 minute and 49 seconds
......@@ -285,7 +285,7 @@
(let [{:keys [message sender]} (keywordize-keys payload)
{:keys [action data]} message]
; (console/log "GOT INTERNAL MESSAGE" message "from" sender)
(condp = (keyword action)
(case (keyword action)
:reload-data (go (dispatch [:data-load (<! (io/load :data)) (<! (io/load :settings))]))
:delete-url (dispatch [:delete-url data])
(console/error "Nothing matched" message)))
......@@ -9,7 +9,7 @@
"Migrates a data set from its version to the next one. Returns the same
data set if it cannot apply any migration."
(condp = (:data-version data)
(case (:data-version data)
nil (->
(assoc :instance-id (or (:instance-id data)
......@@ -166,7 +166,7 @@
(fn []
[:div {:class "navbar-header"}
[:a {:class "navbar-brand"}
(condp = @section
(case @section
:intro "About Relevance"
:url-times "Time reading a page"
:site-times "Time visiting a site"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment