From e66bb788f569fc3123e22372e871759d4d420c52 Mon Sep 17 00:00:00 2001 From: Desmond Kyeremeh Date: Fri, 23 Jul 2021 13:51:48 +0000 Subject: moved stuff to selectors --- modern/src/common/selectors.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modern/src/common/selectors.js b/modern/src/common/selectors.js index 44a0c54..ddf9dbe 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]; -- cgit v1.2.3