box-ui-elements-mlh
Version:
10 lines (8 loc) • 423 B
JavaScript
// @flow
import getProp from 'lodash/get';
import { REPRESENTATIONS_RESPONSE_SUCCESS, REPRESENTATIONS_RESPONSE_VIEWABLE } from '../../constants';
import type { BoxItem } from '../../common/types/core';
export default (item: BoxItem) => {
const status = getProp(item, 'representations.entries[0].status.state');
return status === REPRESENTATIONS_RESPONSE_SUCCESS || status === REPRESENTATIONS_RESPONSE_VIEWABLE;
};