1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import React from 'react';
- import { connect } from 'react-redux';
- import Diagnosis from '@components/Diagnosis';
- import { SHOW_SEARCH, HIDE_SEARCH } from '@store/types/diagnosticSearch';
- import {HIDEDROP} from '@types/homePage';
- function mapStateToProps(state) {//console.log(state)
- return {
- show: state.diagnosticSearch.show,
- windowHeight:state.homePage.windowHeight,
- typeConfig: state.typeConfig
- }
- }
- function mapDispatchToProps(dispatch) {
- return {
- showSearch:()=>{
- dispatch({
- type: SHOW_SEARCH
- })
- },
- hideSearch:()=>{
- dispatch({
- type: HIDE_SEARCH
- })
- },
- hideAllDrop(){
- dispatch({
- type:HIDEDROP
- });
- },
- }
- }
- const DiagnosisContainer = connect(
- mapStateToProps,
- mapDispatchToProps
- )(Diagnosis)
- export default DiagnosisContainer;
|