import { connect } from 'react-redux' ; import Redux from 'redux' ; import { updateDirtyState } from '../actions/Editor' ; import { AppState } from '../reducers/StateTypes' ; import NotesPanel , { DispatchProps , StateProps } from './NotesPanel' ; const mapStateToProps = ( state ) : StateProps => { return { realtime : state . quest . notesRealtime , realtimeModel : state . quest . realtimeModel , } ; } ; const mapDispatchToProps = ( dispatch ) : DispatchProps => { return { onDirty : ( realtime , text ) => { realtime . setText ( text ) ; dispatch ( updateDirtyState ( ) ) ; } , } ; } ; const NotesPanelContainer = connect ( mapStateToProps , mapDispatchToProps ) ( NotesPanel ) ; export default NotesPanelContainer ;