import React from 'react' import PropTypes from 'prop-types' import { translate } from 'react-i18next' import ClipDragSource from './ClipDragSource' import RecentFeed from './RecentFeed' import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap' export class ClipArticlesPopup extends React.Component { static propTypes = { hidePopup: PropTypes.func.isRequired, clipArticles: PropTypes.func.isRequired, articles: PropTypes.array.isRequired, recentClipFeeds: PropTypes.array.isRequired, getRecentClipFeeds: PropTypes.func.isRequired, t: PropTypes.func.isRequired } hidePopupFromOutside = (e) => { if (e.target === e.currentTarget) this.hidePopup() } hidePopup = () => { this.props.hidePopup() } onSubmit = () => { this.hidePopup() } componentWillMount = () => { this.props.getRecentClipFeeds() } onRecentFeedClick = (feed) => { this.props.clipArticles(feed.id) this.props.hidePopup() } render() { const { t, articles, recentClipFeeds } = this.props return ( {t('searchTab.clipPopup.header')}

{t('searchTab.clipPopup.hint1')}

{recentClipFeeds && recentClipFeeds.length > 0 && (

{t('searchTab.clipPopup.hint2')}

{recentClipFeeds.map((feed) => { return ( ) })}
)}
) } } export default translate(['tabsContent', 'common'], { wait: true })( ClipArticlesPopup )