aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/selectors.js
blob: e52943c48884efbc20ea2640581fa3a57554e0c2 (plain)
1
2
3
4
5
6
7
8
9
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 getFilteredDevices = (state) => Object.values(state.devices.filteredItems);

export const getPosition = (id) => (state) => state.positions.items[id];