Continuing updating the reformatting of propTypes and set redux, intl functions to end of component

• Removing:
- the reformatting of propTypes and set redux, intl functions to end of component
This commit is contained in:
mgabdev
2020-08-17 19:57:35 -05:00
parent 46a0cbca7d
commit ddca693cfc
101 changed files with 2053 additions and 2140 deletions

View File

@@ -11,38 +11,14 @@ import Text from './text'
const MAX_HEIGHT = 200
const messages = defineMessages({
show: { id: 'status.show_more', defaultMessage: 'Show' },
hide: { id: 'status.show_less', defaultMessage: 'Hide' },
readMore: { id: 'status.read_more', defaultMessage: 'Read more' },
})
const cx = classNames.bind(_s)
// .emojione {
// margin: -3px 0 0;
// @include size(20px);
// }
export default
@injectIntl
class StatusContent extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,
}
static propTypes = {
status: ImmutablePropTypes.map.isRequired,
expanded: PropTypes.bool,
onExpandedToggle: PropTypes.func,
onClick: PropTypes.func,
collapsable: PropTypes.bool,
intl: PropTypes.object.isRequired,
isComment: PropTypes.bool,
}
state = {
hidden: true,
collapsed: null, // `collapsed: null` indicates that an element doesn't need collapsing, while `true` or `false` indicates that it does (and is/isn't).
@@ -353,3 +329,21 @@ class StatusContent extends ImmutablePureComponent {
}
}
const messages = defineMessages({
show: { id: 'status.show_more', defaultMessage: 'Show' },
hide: { id: 'status.show_less', defaultMessage: 'Hide' },
readMore: { id: 'status.read_more', defaultMessage: 'Read more' },
})
StatusContent.propTypes = {
status: ImmutablePropTypes.map.isRequired,
expanded: PropTypes.bool,
onExpandedToggle: PropTypes.func,
onClick: PropTypes.func,
collapsable: PropTypes.bool,
intl: PropTypes.object.isRequired,
isComment: PropTypes.bool,
}
export default injectIntl(StatusContent)