import PropTypes from 'prop-types' import React from 'react' import Shapes from '../../../../shapes' import { Link } from 'react-router-dom' import FontAwesome from 'react-fontawesome' import ScenarioListContainer from '../../../../containers/app/sidebars/project/ScenarioListContainer' class PortfolioListComponent extends React.Component { static propTypes = { portfolios: PropTypes.arrayOf(Shapes.Portfolio), currentProjectId: PropTypes.string.isRequired, currentPortfolioId: PropTypes.string, onNewPortfolio: PropTypes.func.isRequired, onChoosePortfolio: PropTypes.func.isRequired, onDeletePortfolio: PropTypes.func.isRequired, } onDelete(id) { this.props.onDeletePortfolio(id) } render() { return (

Portfolios

{this.props.portfolios.map((portfolio, idx) => (
{portfolio.name}
this.props.onChoosePortfolio(portfolio._id)} /> this.onDelete(portfolio._id)} />
))}
) } } export default PortfolioListComponent