aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-23 13:51:48 +0000
committerDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-23 13:51:48 +0000
commite66bb788f569fc3123e22372e871759d4d420c52 (patch)
treed4114d47965ce54d9fcc3ff0b6e4b58950064e49
parentd5a11fa77ad6a4ebda229b92f3666419c67cf516 (diff)
downloadtrackermap-web-e66bb788f569fc3123e22372e871759d4d420c52.tar.gz
trackermap-web-e66bb788f569fc3123e22372e871759d4d420c52.tar.bz2
trackermap-web-e66bb788f569fc3123e22372e871759d4d420c52.zip
moved stuff to selectors
-rw-r--r--modern/src/common/selectors.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modern/src/common/selectors.js b/modern/src/common/selectors.js
index 44a0c547..ddf9dbec 100644
--- a/modern/src/common/selectors.js
+++ b/modern/src/common/selectors.js
@@ -1,3 +1,7 @@
export const getIsAdmin = (state) => state.session.user?.administrator;
export const getUserId = (state) => state.session.user?.id;
+
+export const getDevices = (state) => Object.values(state.devices.items);
+
+export const getItemPosition = (itemId) => (state) => state.positions.items[itemId];