diff options
author | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-23 13:51:48 +0000 |
---|---|---|
committer | Desmond Kyeremeh <elDekyfin@gmail.com> | 2021-07-23 13:51:48 +0000 |
commit | e66bb788f569fc3123e22372e871759d4d420c52 (patch) | |
tree | d4114d47965ce54d9fcc3ff0b6e4b58950064e49 /modern/src | |
parent | d5a11fa77ad6a4ebda229b92f3666419c67cf516 (diff) | |
download | trackermap-web-e66bb788f569fc3123e22372e871759d4d420c52.tar.gz trackermap-web-e66bb788f569fc3123e22372e871759d4d420c52.tar.bz2 trackermap-web-e66bb788f569fc3123e22372e871759d4d420c52.zip |
moved stuff to selectors
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/common/selectors.js | 4 |
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]; |