import React from "react"; import {Link} from 'react-router-dom'; import {connect} from "react-redux"; export class Services extends React.Component { render() { const {categories,doctors} = this.props; return (
{categories.map(el => (
{el.name} {el.services.map(item => (

{item.name}

Стоимость: {item.price} грн.

el.speciality.find(serv => serv._id === item._id))._id}/${item.name}`} className="btn service-btn"> Записаться
))}
))}
); } } const mapStateToProps = state => { return { categories: state.services.categories, doctors:state.app.doctors }; }; const mapDispatchToProps = { }; export default connect(mapStateToProps, mapDispatchToProps)(Services); {/* {item.name} */}