An easy-to-use platform for EEG experimentation in the classroom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 30 lines 940 B view raw
1import React from 'react'; 2import { bindActionCreators } from 'redux'; 3import { connect } from 'react-redux'; 4import { useNavigate } from 'react-router-dom'; 5import Design from '../components/DesignComponent'; 6import { ExperimentActions } from '../actions'; 7import { RootState } from '../store'; 8import { ExperimentParameters } from '../constants/interfaces'; 9 10function mapStateToProps(state: RootState) { 11 return { 12 ...state.experiment, 13 params: state.experiment.params as ExperimentParameters, 14 }; 15} 16 17function mapDispatchToProps(dispatch) { 18 return { 19 ExperimentActions: bindActionCreators(ExperimentActions, dispatch), 20 }; 21} 22 23const ConnectedDesign = connect(mapStateToProps, mapDispatchToProps)(Design); 24 25function ExperimentDesignContainer(props: Record<string, unknown>) { 26 const navigate = useNavigate(); 27 return React.createElement(ConnectedDesign, { ...props, navigate }); 28} 29 30export default ExperimentDesignContainer;