🔥 Remove unused code.

This commit is contained in:
Andrey Antukh 2019-09-21 20:13:14 +02:00
parent abc1406f4d
commit 163e102bcf
6 changed files with 10 additions and 239 deletions

View file

@ -11,36 +11,6 @@
[uxbox.main.constants :as c]
[uxbox.main.store :as st]))
;; TODO: move inside workspaces because this is workspace only refs
;; --- Helpers
(defn resolve-project
"Retrieve the current project."
[state]
(let [project-id (get-in state [:workspace :project])]
(get-in state [:projects project-id])))
(defn resolve-page
[state]
(let [page-id (get-in state [:workspace :page])]
(get-in state [:pages page-id])))
(defn- resolve-project-pages
[state]
(let [project (get-in state [:workspace :project])
get-order #(get-in % [:metadata :order])]
(->> (vals (:pages state))
(filter #(= project (:project %)))
(sort-by get-order))))
(def ^:deprecated selected-page
"Ref to the current selected page."
(-> (l/lens resolve-page)
(l/derive st/state)))
;; --- NOT DEPRECATED
(def workspace
(letfn [(selector [state]
(let [id (get-in state [:workspace :current])]