2020-08-17 15:07:16 -05:00
|
|
|
import React from 'react'
|
2020-08-17 15:59:29 -05:00
|
|
|
import PropTypes from 'prop-types'
|
2020-08-17 15:39:25 -05:00
|
|
|
import { connect } from 'react-redux'
|
2020-08-10 22:01:09 -05:00
|
|
|
import { clearCompose } from '../../actions/compose'
|
2020-05-14 22:31:24 -04:00
|
|
|
import ComposeFormContainer from './containers/compose_form_container'
|
2019-08-09 12:06:27 -04:00
|
|
|
|
2020-08-17 15:07:16 -05:00
|
|
|
class Compose extends React.PureComponent {
|
2020-08-10 22:01:09 -05:00
|
|
|
|
|
|
|
componentWillUnmount() {
|
|
|
|
this.props.onClearCompose()
|
|
|
|
}
|
2019-08-09 12:06:27 -04:00
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
2020-08-18 15:49:11 -05:00
|
|
|
<div className={[_s.d, _s.bgPrimary, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
2020-05-14 23:17:31 -04:00
|
|
|
<ComposeFormContainer isStandalone />
|
2019-08-09 12:06:27 -04:00
|
|
|
</div>
|
2020-05-14 22:31:24 -04:00
|
|
|
)
|
2019-08-09 12:06:27 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-08-17 17:06:22 -05:00
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
|
|
|
onClearCompose:() => dispatch(clearCompose())
|
|
|
|
})
|
|
|
|
|
|
|
|
Compose.propTypes = {
|
|
|
|
onClearCompose: PropTypes.func.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(null, mapDispatchToProps)(Compose)
|