superdesk/superdesk-client-core

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

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import {isEmpty} from 'lodash';
import {AssociatedItemsList} from './AssociatedItemsList';
import {IPropsItemListInfo} from '../ListItemInfo';

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

        return (
            isEmpty(item.associations) ? null : <AssociatedItemsList key="associatedItems" item={item} />
        );
    }
}

export const associatedItems = AssociatedItemsComponent;