import { get } from 'lodash' import { IOrgState, IOrg } from './interfaces' const root = (state: any): IOrgState => state.org const org = (state: any): IOrg => root(state).org export const orgId = (state: any): string => get(org(state), 'id') export const orgHandle = (state: any): string => get(org(state), 'handle') export const orgProperties = (state: any) => root(state).orgProperties export const widgetColor = (state: any) => get(orgProperties(state), 'widgetColor', '0176FF') export const usersById = (state: any) => root(state).usersById