import React from 'react'; import {Link} from 'react-router-dom' import {connect} from 'react-redux' export class Doctors extends React.Component { render() { const {data} = this.props; return (
{ data.map(el => (
{el.name}/

{el.name}

Опыт работы {new Date().toISOString().split('T')[0].split('-')[0] - el.experience.split('T')[0].split('-')[0]} лет

{el.profession}

Подробнее ... Записаться на приём
)) }
); } } const mapStateToProps = state => { return { data:state.app.doctors } }; const mapDispatchToProps = { }; export default connect (mapStateToProps,mapDispatchToProps)(Doctors)