0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 00:58:26 -05:00

Use the same ordering in view and main sitemap.

Related #68
This commit is contained in:
Andrey Antukh 2017-03-02 18:39:42 +01:00
parent 34e476a4db
commit 993657a1cc
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -8,9 +8,9 @@
(ns uxbox.view.ui.viewer.sitemap
(:require [sablono.core :refer-macros (html)]
[lentes.core :as l]
[uxbox.util.i18n :refer (tr)]
[uxbox.util.i18n :refer [tr]]
[uxbox.util.mixins :as mx :include-macros true]
[uxbox.util.data :refer (parse-int)]
[uxbox.util.data :refer [parse-int]]
[potok.core :as ptk]
[uxbox.view.store :as st]
[uxbox.builtins.icons :as i]
@ -37,7 +37,8 @@
{:mixins [mx/static mx/reactive]}
[]
(let [project-name (mx/react project-name-ref)
pages (mx/react pages-ref)
pages (->> (mx/react pages-ref)
(sort-by #(get-in % [:metadata :order])))
selected (mx/react selected-ref)
on-click #(st/emit! (dv/select-page %))]
[:div.view-sitemap