import React from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; import {PhotoDeskFields} from './PhotoDeskFields'; import {DEFAULT_GRID_VIEW_FOOTER_CONFIG} from 'apps/search/constants'; import {appConfig} from 'appConfig'; import {IArticle} from 'superdesk-api'; interface IProps { item: IArticle; getActionsMenu?: any; } export const PhotoDeskFooter: React.StatelessComponent = (props) => { const {item} = props; const gridViewFooterFieldsConfig = appConfig.gridViewFooterFields ?? DEFAULT_GRID_VIEW_FOOTER_CONFIG; const fieldsLeft = gridViewFooterFieldsConfig.left; const fieldsRight = gridViewFooterFieldsConfig.right; return (
{ Array.isArray(fieldsLeft) === true && fieldsLeft.length > 0 ? (
) : null } { Array.isArray(fieldsRight) === true && fieldsRight.length > 0 ? (
) : null } { props.getActionsMenu == null ? null : props.getActionsMenu() }
); }; PhotoDeskFooter.propTypes = { item: PropTypes.any, getActionsMenu: PropTypes.func, };