superdesk/superdesk-client-core

View on GitHub
scripts/apps/search/components/fields/takekey.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import {gettext} from 'core/utils';
import {IPropsItemListInfo} from '../ListItemInfo';

class TakeKeyComponent extends React.Component<IPropsItemListInfo> {
    render() {
        const props = this.props;

        if (props.item.anpa_take_key) {
            return React.createElement('span', {className: 'takekey', key: 'takekey'},
                gettext(props.item.anpa_take_key));
        } else {
            return null;
        }
    }
}

export const takekey = TakeKeyComponent;