import {connect} from 'react-redux'
import {setOriginalText} from './synonymizationActions';
import InputBox from "./InputBox";
import apiConstants from "../api/apiConstants";

const mapStateToProps = state => ({
    content: state.synonymization.original,
    disabled: state.api.status === apiConstants.STATUSES.FETCHING
})

const mapDispatchToProps = dispatch => ({
    onChange: text => {
        dispatch(setOriginalText(text))
    }
})


export default connect(
    mapStateToProps,
    mapDispatchToProps
)(InputBox);
@@ -168,16 +168,98 @@
 stants%22;
+%0Aimport %7BsetApiStatus%7D from %22../api/apiActions%22;%0Aimport store from %22../app/store%22;
 %0A%0Aconst 
@@ -508,16 +508,82 @@
 (text))%0A
+        store.dispatch(setApiStatus(apiConstants.STATUSES.NONE));%0A
     %7D%0A%7D)

Update api status on change