0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 16:30:37 -05:00

Cosmetic fixs on sitemap refs.

This commit is contained in:
Andrey Antukh 2016-07-09 21:32:00 +03:00
parent 3a7e487f18
commit 43a1ca9fc0
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -29,12 +29,16 @@
;; --- Lenses
(defn- resolve-page
[state]
(let [project (get-in state [:workspace :project])]
(->> (vals (:pages-by-id state))
(filter #(= project (:project %)))
(sort-by :created-at))))
(def pages-l
(letfn [(getter [state]
(let [project (get-in state [:workspace :project])]
(stpr/project-pages state project)))]
(-> (l/lens getter)
(l/derive st/state))))
(-> (l/lens resolve-page)
(l/derive st/state)))
;; --- Component