Updated PureComponent usage
This commit is contained in:
parent
cb55ef9f04
commit
960c43d24c
@ -28,7 +28,7 @@ const links = [
|
|||||||
export default
|
export default
|
||||||
@injectIntl
|
@injectIntl
|
||||||
@withRouter
|
@withRouter
|
||||||
class FooterBar extends React.PureComponent {
|
class FooterBar extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { monthlyExpensesComplete } from '../../initial_state';
|
import { monthlyExpensesComplete } from '../../initial_state';
|
||||||
|
|
||||||
export default class ProgressPanel extends React.PureComponent {
|
export default class ProgressPanel extends PureComponent {
|
||||||
render() {
|
render() {
|
||||||
if (!monthlyExpensesComplete) return null;
|
if (!monthlyExpensesComplete) return null;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ const mapStateToProps = (state, { id }) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
@connect(mapStateToProps)
|
@connect(mapStateToProps)
|
||||||
export default class StatusQuote extends React.PureComponent {
|
export default class StatusQuote extends PureComponent {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: PropTypes.object,
|
router: PropTypes.object,
|
||||||
|
@ -32,7 +32,7 @@ const mapStateToProps = state => {
|
|||||||
|
|
||||||
export default @connect(mapStateToProps)
|
export default @connect(mapStateToProps)
|
||||||
@injectIntl
|
@injectIntl
|
||||||
class CommunityTimeline extends React.PureComponent {
|
class CommunityTimeline extends PureComponent {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: PropTypes.object,
|
router: PropTypes.object,
|
||||||
|
@ -2,7 +2,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|||||||
import DisplayName from '../../../components/display_name';
|
import DisplayName from '../../../components/display_name';
|
||||||
import StatusContent from '../../../components/status_content';
|
import StatusContent from '../../../components/status_content';
|
||||||
|
|
||||||
export default class QuotedStatusPreview extends React.PureComponent {
|
export default class QuotedStatusPreview extends PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
status: ImmutablePropTypes.map,
|
status: ImmutablePropTypes.map,
|
||||||
account: ImmutablePropTypes.map,
|
account: ImmutablePropTypes.map,
|
||||||
|
@ -9,7 +9,7 @@ const messages = defineMessages({
|
|||||||
schedule_status: { id: 'schedule_status.title', defaultMessage: 'Schedule Status' },
|
schedule_status: { id: 'schedule_status.title', defaultMessage: 'Schedule Status' },
|
||||||
});
|
});
|
||||||
|
|
||||||
class DatePickerWrapper extends React.PureComponent {
|
class DatePickerWrapper extends PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
onClick: PropTypes.func,
|
onClick: PropTypes.func,
|
||||||
@ -27,7 +27,7 @@ class DatePickerWrapper extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default @injectIntl
|
export default @injectIntl
|
||||||
class SchedulePostDropdown extends React.PureComponent {
|
class SchedulePostDropdown extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
date: PropTypes.instanceOf(Date),
|
date: PropTypes.instanceOf(Date),
|
||||||
|
@ -3,7 +3,7 @@ import { injectIntl, FormattedMessage } from 'react-intl';
|
|||||||
import SettingToggle from '../../../../components/setting_toggle';
|
import SettingToggle from '../../../../components/setting_toggle';
|
||||||
|
|
||||||
export default @injectIntl
|
export default @injectIntl
|
||||||
class ColumnSettings extends React.PureComponent {
|
class ColumnSettings extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
settings: ImmutablePropTypes.map.isRequired,
|
settings: ImmutablePropTypes.map.isRequired,
|
||||||
|
@ -144,7 +144,7 @@ const LAYOUT = {
|
|||||||
|
|
||||||
const shouldHideFAB = path => path.match(/^\/posts\/|^\/search|^\/getting-started/);
|
const shouldHideFAB = path => path.match(/^\/posts\/|^\/search|^\/getting-started/);
|
||||||
|
|
||||||
class SwitchingColumnsArea extends React.PureComponent {
|
class SwitchingColumnsArea extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
@ -251,7 +251,7 @@ class SwitchingColumnsArea extends React.PureComponent {
|
|||||||
export default @connect(mapStateToProps)
|
export default @connect(mapStateToProps)
|
||||||
@injectIntl
|
@injectIntl
|
||||||
@withRouter
|
@withRouter
|
||||||
class UI extends React.PureComponent {
|
class UI extends PureComponent {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
|
@ -86,7 +86,7 @@ export const getPointerPosition = (el, event) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default @injectIntl
|
export default @injectIntl
|
||||||
class Video extends React.PureComponent {
|
class Video extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
preview: PropTypes.string,
|
preview: PropTypes.string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user