categories.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // import React from 'react';
  2. // // import {Link} from 'react-router-dom';
  3. // import {connect} from 'react-redux';
  4. // export class Services extends React.Component {
  5. // render() {
  6. // const { categories} = this.props;
  7. // const servArray = Object.keys(categories).map(key => {
  8. // return [key, categories[key]];
  9. // })
  10. // // const category = servArray.slice (1, 2 )
  11. // // console.log ("data:", data);
  12. // // console.log ("categories:", Object.values (categories))
  13. // console.log ("servArray:", servArray)
  14. // // console.log ("category:", category)
  15. // // console.log ("this.props:", this.props.app)
  16. // return (
  17. // <div className="main">
  18. // <div className="wrapper">
  19. // <div className = "doctors-wrap">
  20. // { servArray.map (( el, index )=> (
  21. // <div className = "serv-wrap" key = {index}>
  22. // { el[1].map ((item, index) => (
  23. // <div className = "servise-name" key = {index} >
  24. // <p>{item.name}</p>
  25. // <p>Длительность: {item.duration} ч.</p>
  26. // <p>Цена: {item.price} грн.</p>
  27. // <div>
  28. // <button className = "btn service-btn"> Записаться на приём </button>
  29. // </div>
  30. // </div>
  31. // ))}
  32. // </div>
  33. // ))
  34. // }
  35. // </div>
  36. // </div>
  37. // </div>
  38. // );
  39. // }
  40. // }
  41. // const mapStateToProps = state => {
  42. // return {
  43. // app:state.app,
  44. // data:state.services.services,
  45. // categories:state.services.categories
  46. // }
  47. // };
  48. // const mapDispatchToProps = {
  49. // };
  50. // export default connect (mapStateToProps,mapDispatchToProps)(Services)