mirror of
https://github.com/status-im/status-react.git
synced 2025-01-29 12:16:36 +00:00
9ec0d03d90
Former-commit-id: 4413d8dc3bb0101e583beacbd89e57d223ad2d5a
22 lines
579 B
Clojure
22 lines
579 B
Clojure
(ns status-im.subs
|
|
(:require-macros [reagent.ratom :refer [reaction]])
|
|
(:require [re-frame.core :refer [register-sub]]
|
|
status-im.chat.subs
|
|
status-im.group-settings.subs
|
|
status-im.discovery.subs
|
|
status-im.contacts.subs
|
|
status-im.new-group.subs
|
|
status-im.participants.subs))
|
|
|
|
(register-sub :get
|
|
(fn [db [_ k]]
|
|
(reaction (k @db))))
|
|
|
|
(register-sub :get-in
|
|
(fn [db [_ path]]
|
|
(reaction (get-in @db path))))
|
|
|
|
(register-sub :animations
|
|
(fn [db [_ k]]
|
|
(reaction (get-in @db [:animations k]))))
|