aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/selectors.js
blob: ad42c306d632771e3d0fe7e573719b22701ac319 (plain)
1
2
3
4
5
6
7
8
9
10
11
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 getFilterTerm = (state) => state.devices.filterTerm;

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