mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 00:56:12 +02:00
Move router lense decaration to uxbox.ui ns.
This commit is contained in:
parent
e0ba0fd41f
commit
6eb65bfe39
2 changed files with 5 additions and 6 deletions
|
@ -10,17 +10,12 @@
|
||||||
[bidi.bidi :as bidi]
|
[bidi.bidi :as bidi]
|
||||||
[goog.events :as events]
|
[goog.events :as events]
|
||||||
[lentes.core :as l]
|
[lentes.core :as l]
|
||||||
[uxbox.state :as s]
|
|
||||||
[uxbox.rstore :as rs]))
|
[uxbox.rstore :as rs]))
|
||||||
|
|
||||||
(enable-console-print!)
|
(enable-console-print!)
|
||||||
|
|
||||||
(defonce +router+ (volatile! nil))
|
(defonce +router+ (volatile! nil))
|
||||||
|
|
||||||
(def route-l
|
|
||||||
(as-> (l/in [:route]) $
|
|
||||||
(l/focus-atom $ s/state)))
|
|
||||||
|
|
||||||
;; --- Update Location (Event)
|
;; --- Update Location (Event)
|
||||||
|
|
||||||
(defrecord UpdateLocation [id params]
|
(defrecord UpdateLocation [id params]
|
||||||
|
|
|
@ -30,11 +30,15 @@
|
||||||
(def ^:const +unrestricted+ #{:auth/login})
|
(def ^:const +unrestricted+ #{:auth/login})
|
||||||
(def ^:const restricted? (complement +unrestricted+))
|
(def ^:const restricted? (complement +unrestricted+))
|
||||||
|
|
||||||
|
(def route-l
|
||||||
|
(as-> (l/key :route) $
|
||||||
|
(l/focus-atom $ st/state)))
|
||||||
|
|
||||||
;; --- Main App (Component)
|
;; --- Main App (Component)
|
||||||
|
|
||||||
(defn app-render
|
(defn app-render
|
||||||
[own]
|
[own]
|
||||||
(let [route (rum/react r/route-l)
|
(let [route (rum/react route-l)
|
||||||
auth (rum/react st/auth-l)
|
auth (rum/react st/auth-l)
|
||||||
location (:id route)
|
location (:id route)
|
||||||
params (:params route)]
|
params (:params route)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue