Sha256: d39aee85129f80fa2e1da381f124716e8e0d1d145578127d6769e2d321695fbc
Contents?: true
Size: 748 Bytes
Versions: 18
Compression:
Stored size: 748 Bytes
Contents
import { STATUS } from 'foremanReact/constants'; import { deepPropsToCamelCase } from 'foremanReact/common/helpers'; import { selectAPIStatus, selectAPIResponse, } from 'foremanReact/redux/API/APISelectors'; import { WEBHOOK_API_REQUEST_KEY } from '../../constants'; export const selectWebhookValues = state => deepPropsToCamelCase(selectAPIResponse(state, WEBHOOK_API_REQUEST_KEY)) || {}; export const selectWebhookTemplateId = state => selectWebhookValues(state)?.webhookTemplate?.id || 0; const selectWebhooksEditPageStatus = state => selectAPIStatus(state, WEBHOOK_API_REQUEST_KEY); export const selectIsLoading = state => { const status = selectWebhooksEditPageStatus(state); return !status || status === STATUS.PENDING; };
Version data entries
18 entries across 18 versions & 1 rubygems