/* * * InstallPluginPopup * */ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { Modal, ModalHeader, ModalBody } from 'reactstrap'; import { map } from 'lodash'; import styles from './styles.scss'; class InstallPluginPopup extends React.Component { toggle = () => { this.props.history.push({ pathname: this.props.history.location.pathname, }); } navLinks = [ { content: 'app.components.InstallPluginPopup.navLink.description', name: 'description', }, // { // content: 'app.components.InstallPluginPopup.navLink.screenshots', // name: 'screenshots', // }, // { // content: 'app.components.InstallPluginPopup.navLink.avis', // name: 'avis', // }, ]; render() { return (
{this.props.plugin.name}
{map(this.props.coloredStars, star => )}
{map(this.props.emptyStars, star => )}
{this.props.plugin.ratings} /5
+{this.props.plugin.downloads_nb}k 
{this.props.plugin.price} €
{map(this.navLinks, link => { const isActive = this.props.history.location.hash.split('::')[1] === link.name; return (
this.props.history.push({ pathname: this.props.history.location.pathname, hash: `${this.props.plugin.id}::${link.name}` })} style={isActive ? { paddingTop: '5px'} : { paddingTop: '7px' }}>
); })}
{this.props.plugin.longDescription}
); } } InstallPluginPopup.propTypes = { coloredStars: PropTypes.array.isRequired, emptyStars: PropTypes.array.isRequired, history: PropTypes.object.isRequired, isOpen: PropTypes.bool.isRequired, plugin: PropTypes.object.isRequired, }; export default InstallPluginPopup;