mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 15:18:23 +02:00
🔥 Remove unused code.
This commit is contained in:
parent
abc1406f4d
commit
163e102bcf
6 changed files with 10 additions and 239 deletions
|
@ -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])]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue