gab-social/app/javascript/gabsocial/features/compose/compose.js

31 lines
756 B
JavaScript
Raw Normal View History

import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { clearCompose } from '../../actions/compose'
2020-05-15 03:31:24 +01:00
import ComposeFormContainer from './containers/compose_form_container'
class Compose extends React.PureComponent {
componentWillUnmount() {
this.props.onClearCompose()
}
render () {
return (
<div className={[_s.d, _s.bgPrimary, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
2020-05-15 04:17:31 +01:00
<ComposeFormContainer isStandalone />
</div>
2020-05-15 03:31:24 +01:00
)
}
}
const mapDispatchToProps = (dispatch) => ({
onClearCompose:() => dispatch(clearCompose())
})
Compose.propTypes = {
onClearCompose: PropTypes.func.isRequired,
}
export default connect(null, mapDispatchToProps)(Compose)