gab-social/app/javascript/gabsocial/features/compose/compose.js
mgabdev 176ddc22f2 Updated the default class name
• Updated:
- the default class name
2020-08-18 15:49:11 -05:00

31 lines
756 B
JavaScript

import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { clearCompose } from '../../actions/compose'
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(' ')}>
<ComposeFormContainer isStandalone />
</div>
)
}
}
const mapDispatchToProps = (dispatch) => ({
onClearCompose:() => dispatch(clearCompose())
})
Compose.propTypes = {
onClearCompose: PropTypes.func.isRequired,
}
export default connect(null, mapDispatchToProps)(Compose)