♻️ Move lens to a more specific site

This commit is contained in:
Andrés Moya 2021-09-28 17:13:53 +02:00
parent 4df96b03eb
commit 695788df0e
2 changed files with 5 additions and 4 deletions

View file

@ -338,9 +338,6 @@
(def viewer-local
(l/derived :viewer-local st/state))
(def viewer-interactions-show?
(l/derived :interactions-show? viewer-local))
(def comment-threads
(l/derived :comment-threads st/state))

View file

@ -30,11 +30,15 @@
[app.util.object :as obj]
[app.util.router :as rt]
[app.util.timers :as tm]
[okulary.core :as l]
[rumext.alpha :as mf]))
(def base-frame-ctx (mf/create-context nil))
(def frame-offset-ctx (mf/create-context nil))
(def viewer-interactions-show?
(l/derived :interactions-show? refs/viewer-local))
(defn activate-interaction
[interaction shape base-frame frame-offset objects]
(case (:action-type interaction)
@ -208,7 +212,7 @@
base-frame (mf/use-ctx base-frame-ctx)
frame-offset (mf/use-ctx frame-offset-ctx)
interactions-show? (mf/deref refs/viewer-interactions-show?)
interactions-show? (mf/deref viewer-interactions-show?)
interactions (:interactions shape)