Diagnosis.js 940 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import React from 'react';
  2. import { connect } from 'react-redux';
  3. import Diagnosis from '@components/Diagnosis';
  4. import { SHOW_SEARCH, HIDE_SEARCH } from '@store/types/diagnosticSearch';
  5. import {HIDEDROP} from '@types/homePage';
  6. function mapStateToProps(state) {//console.log(state)
  7. return {
  8. show: state.diagnosticSearch.show,
  9. windowHeight:state.homePage.windowHeight,
  10. typeConfig: state.typeConfig
  11. }
  12. }
  13. function mapDispatchToProps(dispatch) {
  14. return {
  15. showSearch:()=>{
  16. dispatch({
  17. type: SHOW_SEARCH
  18. })
  19. },
  20. hideSearch:()=>{
  21. dispatch({
  22. type: HIDE_SEARCH
  23. })
  24. },
  25. hideAllDrop(){
  26. dispatch({
  27. type:HIDEDROP
  28. });
  29. },
  30. }
  31. }
  32. const DiagnosisContainer = connect(
  33. mapStateToProps,
  34. mapDispatchToProps
  35. )(Diagnosis)
  36. export default DiagnosisContainer;