Upgrade Babel to version 7.0.0 (#5925)

This commit is contained in:
Yamagishi Kazutoshi 2018-09-15 00:59:48 +09:00 committed by Eugen Rochko
parent 64a5561b5a
commit 0ddbccf7e6
78 changed files with 2341 additions and 2276 deletions

View file

@ -1,66 +0,0 @@
{
"presets": [
"react",
[
"env",
{
"exclude": ["transform-async-to-generator", "transform-regenerator"],
"loose": true,
"modules": false,
"targets": {
"browsers": ["last 2 versions", "IE >= 11", "iOS >= 9"]
}
}
]
],
"plugins": [
"syntax-dynamic-import",
["transform-object-rest-spread", { "useBuiltIns": true }],
"transform-decorators-legacy",
"transform-class-properties",
[
"react-intl",
{
"messagesDir": "./build/messages"
}
],
"preval"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source",
"transform-react-jsx-self"
]
},
"production": {
"plugins": [
"lodash",
[
"transform-react-remove-prop-types",
{
"mode": "remove",
"removeImport": true,
"additionalLibraries": [
"react-immutable-proptypes"
]
}
],
"transform-react-inline-elements",
[
"transform-runtime",
{
"helpers": true,
"polyfill": false,
"regenerator": false
}
]
]
},
"test": {
"plugins": [
"transform-es2015-modules-commonjs"
]
}
}
}

View file

@ -87,7 +87,7 @@ gem 'tty-command', '~> 0.8', require: false
gem 'tty-prompt', '~> 0.16', require: false
gem 'twitter-text', '~> 1.14'
gem 'tzinfo-data', '~> 1.2018'
gem 'webpacker', '~> 3.4'
gem 'webpacker', '~> 3.5'
gem 'webpush'
gem 'json-ld', '~> 2.2'

View file

@ -627,7 +627,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
webpacker (3.4.3)
webpacker (3.5.5)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
@ -758,7 +758,7 @@ DEPENDENCIES
twitter-text (~> 1.14)
tzinfo-data (~> 1.2018)
webmock (~> 3.3)
webpacker (~> 3.4)
webpacker (~> 3.5)
webpush
RUBY VERSION

View file

@ -3,7 +3,6 @@
exports[`<Button /> adds class "button-secondary" if props.secondary given 1`] = `
<button
className="button button-secondary"
disabled={undefined}
onClick={[Function]}
style={
Object {
@ -18,7 +17,6 @@ exports[`<Button /> adds class "button-secondary" if props.secondary given 1`] =
exports[`<Button /> renders a button element 1`] = `
<button
className="button"
disabled={undefined}
onClick={[Function]}
style={
Object {
@ -48,7 +46,6 @@ exports[`<Button /> renders a disabled attribute if props.disabled given 1`] = `
exports[`<Button /> renders class="button--block" if props.block given 1`] = `
<button
className="button button--block"
disabled={undefined}
onClick={[Function]}
style={
Object {
@ -63,7 +60,6 @@ exports[`<Button /> renders class="button--block" if props.block given 1`] = `
exports[`<Button /> renders the children 1`] = `
<button
className="button"
disabled={undefined}
onClick={[Function]}
style={
Object {
@ -82,7 +78,6 @@ exports[`<Button /> renders the children 1`] = `
exports[`<Button /> renders the given text 1`] = `
<button
className="button"
disabled={undefined}
onClick={[Function]}
style={
Object {
@ -99,7 +94,6 @@ exports[`<Button /> renders the given text 1`] = `
exports[`<Button /> renders the props.text instead of children 1`] = `
<button
className="button"
disabled={undefined}
onClick={[Function]}
style={
Object {

View file

@ -19,8 +19,8 @@ const messages = defineMessages({
unmute_notifications: { id: 'account.unmute_notifications', defaultMessage: 'Unmute notifications from @{name}' },
});
@injectIntl
export default class Account extends ImmutablePureComponent {
export default @injectIntl
class Account extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -10,8 +10,8 @@ const messages = defineMessages({
moveRight: { id: 'column_header.moveRight_settings', defaultMessage: 'Move column to the right' },
});
@injectIntl
export default class ColumnHeader extends React.PureComponent {
export default @injectIntl
class ColumnHeader extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -8,8 +8,8 @@ const messages = defineMessages({
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unhide {domain}' },
});
@injectIntl
export default class Account extends ImmutablePureComponent {
export default @injectIntl
class Account extends ImmutablePureComponent {
static propTypes = {
domain: PropTypes.string,

View file

@ -6,8 +6,8 @@ const messages = defineMessages({
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
});
@injectIntl
export default class LoadGap extends React.PureComponent {
export default @injectIntl
class LoadGap extends React.PureComponent {
static propTypes = {
disabled: PropTypes.bool,

View file

@ -179,8 +179,8 @@ class Item extends React.PureComponent {
}
@injectIntl
export default class MediaGallery extends React.PureComponent {
export default @injectIntl
class MediaGallery extends React.PureComponent {
static propTypes = {
sensitive: PropTypes.bool,

View file

@ -86,8 +86,8 @@ export const timeAgoString = (intl, date, now, year) => {
return relativeTime;
};
@injectIntl
export default class RelativeTimestamp extends React.Component {
export default @injectIntl
class RelativeTimestamp extends React.Component {
static propTypes = {
intl: PropTypes.object.isRequired,

View file

@ -35,8 +35,8 @@ export const textForScreenReader = (intl, status, rebloggedByText = false) => {
return values.join(', ');
};
@injectIntl
export default class Status extends ImmutablePureComponent {
export default @injectIntl
class Status extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -42,8 +42,8 @@ const obfuscatedCount = count => {
}
};
@injectIntl
export default class StatusActionBar extends ImmutablePureComponent {
export default @injectIntl
class StatusActionBar extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -36,8 +36,8 @@ const messages = defineMessages({
unendorse: { id: 'account.unendorse', defaultMessage: 'Don\'t feature on profile' },
});
@injectIntl
export default class ActionBar extends React.PureComponent {
export default @injectIntl
class ActionBar extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -65,8 +65,8 @@ class Avatar extends ImmutablePureComponent {
}
@injectIntl
export default class Header extends ImmutablePureComponent {
export default @injectIntl
class Header extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map,

View file

@ -43,8 +43,8 @@ class LoadMoreMedia extends ImmutablePureComponent {
}
@connect(mapStateToProps)
export default class AccountGallery extends ImmutablePureComponent {
export default @connect(mapStateToProps)
class AccountGallery extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -23,8 +23,8 @@ const mapStateToProps = (state, { params: { accountId }, withReplies = false })
};
};
@connect(mapStateToProps)
export default class AccountTimeline extends ImmutablePureComponent {
export default @connect(mapStateToProps)
class AccountTimeline extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -20,9 +20,9 @@ const mapStateToProps = state => ({
accountIds: state.getIn(['user_lists', 'blocks', 'items']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class Blocks extends ImmutablePureComponent {
class Blocks extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -4,8 +4,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
@injectIntl
export default class ColumnSettings extends React.PureComponent {
export default @injectIntl
class ColumnSettings extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -25,9 +25,9 @@ const mapStateToProps = (state, { onlyMedia, columnId }) => {
};
};
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class CommunityTimeline extends React.PureComponent {
class CommunityTimeline extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -17,8 +17,8 @@ const messages = defineMessages({
filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' },
});
@injectIntl
export default class ActionBar extends React.PureComponent {
export default @injectIntl
class ActionBar extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -27,8 +27,8 @@ const messages = defineMessages({
publishLoud: { id: 'compose_form.publish_loud', defaultMessage: '{publish}!' },
});
@injectIntl
export default class ComposeForm extends ImmutablePureComponent {
export default @injectIntl
class ComposeForm extends ImmutablePureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,

View file

@ -278,8 +278,8 @@ class EmojiPickerMenu extends React.PureComponent {
}
@injectIntl
export default class EmojiPickerDropdown extends React.PureComponent {
export default @injectIntl
class EmojiPickerDropdown extends React.PureComponent {
static propTypes = {
custom_emojis: ImmutablePropTypes.list,

View file

@ -149,8 +149,8 @@ class PrivacyDropdownMenu extends React.PureComponent {
}
@injectIntl
export default class PrivacyDropdown extends React.PureComponent {
export default @injectIntl
class PrivacyDropdown extends React.PureComponent {
static propTypes = {
isUserTouching: PropTypes.func,

View file

@ -12,8 +12,8 @@ const messages = defineMessages({
cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' },
});
@injectIntl
export default class ReplyIndicator extends ImmutablePureComponent {
export default @injectIntl
class ReplyIndicator extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -43,8 +43,8 @@ class SearchPopout extends React.PureComponent {
}
@injectIntl
export default class Search extends React.PureComponent {
export default @injectIntl
class Search extends React.PureComponent {
static propTypes = {
value: PropTypes.string.isRequired,

View file

@ -11,8 +11,8 @@ const messages = defineMessages({
description: { id: 'upload_form.description', defaultMessage: 'Describe for the visually impaired' },
});
@injectIntl
export default class Upload extends ImmutablePureComponent {
export default @injectIntl
class Upload extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.map.isRequired,

View file

@ -23,9 +23,9 @@ const iconStyle = {
lineHeight: '27px',
};
@connect(makeMapStateToProps)
export default @connect(makeMapStateToProps)
@injectIntl
export default class UploadButton extends ImmutablePureComponent {
class UploadButton extends ImmutablePureComponent {
static propTypes = {
disabled: PropTypes.bool,

View file

@ -30,9 +30,9 @@ const mapStateToProps = (state, ownProps) => ({
showSearch: ownProps.multiColumn ? state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']) : ownProps.isSearchPage,
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class Compose extends React.PureComponent {
class Compose extends React.PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -9,8 +9,8 @@ const messages = defineMessages({
settings: { id: 'home.settings', defaultMessage: 'Column settings' },
});
@injectIntl
export default class ColumnSettings extends React.PureComponent {
export default @injectIntl
class ColumnSettings extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -17,9 +17,9 @@ const mapStateToProps = state => ({
hasUnread: state.getIn(['timelines', 'direct', 'unread']) > 0,
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class DirectTimeline extends React.PureComponent {
class DirectTimeline extends React.PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -21,9 +21,9 @@ const mapStateToProps = state => ({
domains: state.getIn(['domain_lists', 'blocks', 'items']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class Blocks extends ImmutablePureComponent {
class Blocks extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -21,9 +21,9 @@ const mapStateToProps = state => ({
hasMore: !!state.getIn(['status_lists', 'favourites', 'next']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class Favourites extends ImmutablePureComponent {
class Favourites extends ImmutablePureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -15,8 +15,8 @@ const mapStateToProps = (state, props) => ({
accountIds: state.getIn(['user_lists', 'favourited_by', props.params.statusId]),
});
@connect(mapStateToProps)
export default class Favourites extends ImmutablePureComponent {
export default @connect(mapStateToProps)
class Favourites extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -13,8 +13,8 @@ const messages = defineMessages({
reject: { id: 'follow_request.reject', defaultMessage: 'Reject' },
});
@injectIntl
export default class AccountAuthorize extends ImmutablePureComponent {
export default @injectIntl
class AccountAuthorize extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -20,9 +20,9 @@ const mapStateToProps = state => ({
accountIds: state.getIn(['user_lists', 'follow_requests', 'items']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class FollowRequests extends ImmutablePureComponent {
class FollowRequests extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -22,8 +22,8 @@ const mapStateToProps = (state, props) => ({
hasMore: !!state.getIn(['user_lists', 'followers', props.params.accountId, 'next']),
});
@connect(mapStateToProps)
export default class Followers extends ImmutablePureComponent {
export default @connect(mapStateToProps)
class Followers extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -22,8 +22,8 @@ const mapStateToProps = (state, props) => ({
hasMore: !!state.getIn(['user_lists', 'following', props.params.accountId, 'next']),
});
@connect(mapStateToProps)
export default class Following extends ImmutablePureComponent {
export default @connect(mapStateToProps)
class Following extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -53,9 +53,9 @@ const badgeDisplay = (number, limit) => {
}
};
@connect(mapStateToProps, mapDispatchToProps)
export default @connect(mapStateToProps, mapDispatchToProps)
@injectIntl
export default class GettingStarted extends ImmutablePureComponent {
class GettingStarted extends ImmutablePureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,

View file

@ -13,8 +13,8 @@ const mapStateToProps = (state, props) => ({
hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
});
@connect(mapStateToProps)
export default class HashtagTimeline extends React.PureComponent {
export default @connect(mapStateToProps)
class HashtagTimeline extends React.PureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -4,8 +4,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
@injectIntl
export default class ColumnSettings extends React.PureComponent {
export default @injectIntl
class ColumnSettings extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -19,9 +19,9 @@ const mapStateToProps = state => ({
isPartial: state.getIn(['timelines', 'home', 'items', 0], null) === null,
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class HomeTimeline extends React.PureComponent {
class HomeTimeline extends React.PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -9,8 +9,8 @@ const messages = defineMessages({
heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' },
});
@injectIntl
export default class KeyboardShortcuts extends ImmutablePureComponent {
export default @injectIntl
class KeyboardShortcuts extends ImmutablePureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,

View file

@ -31,9 +31,9 @@ const mapDispatchToProps = (dispatch, { accountId }) => ({
onAdd: () => dispatch(addToListEditor(accountId)),
});
@connect(makeMapStateToProps, mapDispatchToProps)
export default @connect(makeMapStateToProps, mapDispatchToProps)
@injectIntl
export default class Account extends ImmutablePureComponent {
class Account extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -19,9 +19,9 @@ const mapDispatchToProps = dispatch => ({
onChange: value => dispatch(changeListSuggestions(value)),
});
@connect(mapStateToProps, mapDispatchToProps)
export default @connect(mapStateToProps, mapDispatchToProps)
@injectIntl
export default class Search extends React.PureComponent {
class Search extends React.PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,

View file

@ -22,9 +22,9 @@ const mapDispatchToProps = dispatch => ({
onReset: () => dispatch(resetListEditor()),
});
@connect(mapStateToProps, mapDispatchToProps)
export default @connect(mapStateToProps, mapDispatchToProps)
@injectIntl
export default class ListEditor extends ImmutablePureComponent {
class ListEditor extends ImmutablePureComponent {
static propTypes = {
listId: PropTypes.string.isRequired,

View file

@ -25,9 +25,9 @@ const mapStateToProps = (state, props) => ({
hasUnread: state.getIn(['timelines', `list:${props.params.id}`, 'unread']) > 0,
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class ListTimeline extends React.PureComponent {
class ListTimeline extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -20,9 +20,9 @@ const mapDispatchToProps = dispatch => ({
onSubmit: () => dispatch(submitListEditor(true)),
});
@connect(mapStateToProps, mapDispatchToProps)
export default @connect(mapStateToProps, mapDispatchToProps)
@injectIntl
export default class NewListForm extends React.PureComponent {
class NewListForm extends React.PureComponent {
static propTypes = {
value: PropTypes.string.isRequired,

View file

@ -31,9 +31,9 @@ const mapStateToProps = state => ({
lists: getOrderedLists(state),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class Lists extends ImmutablePureComponent {
class Lists extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -20,9 +20,9 @@ const mapStateToProps = state => ({
accountIds: state.getIn(['user_lists', 'mutes', 'items']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class Mutes extends ImmutablePureComponent {
class Mutes extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -16,8 +16,8 @@ const notificationForScreenReader = (intl, message, timestamp) => {
return output.join(', ');
};
@injectIntl
export default class Notification extends ImmutablePureComponent {
export default @injectIntl
class Notification extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -31,9 +31,9 @@ const mapStateToProps = state => ({
hasMore: state.getIn(['notifications', 'hasMore']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class Notifications extends React.PureComponent {
class Notifications extends React.PureComponent {
static propTypes = {
columnId: PropTypes.string,

View file

@ -18,9 +18,9 @@ const mapStateToProps = state => ({
hasMore: !!state.getIn(['status_lists', 'pins', 'next']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class PinnedStatuses extends ImmutablePureComponent {
class PinnedStatuses extends ImmutablePureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -25,9 +25,9 @@ const mapStateToProps = (state, { onlyMedia, columnId }) => {
};
};
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class PublicTimeline extends React.PureComponent {
class PublicTimeline extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -15,8 +15,8 @@ const mapStateToProps = (state, props) => ({
accountIds: state.getIn(['user_lists', 'reblogged_by', props.params.statusId]),
});
@connect(mapStateToProps)
export default class Reblogs extends ImmutablePureComponent {
export default @connect(mapStateToProps)
class Reblogs extends ImmutablePureComponent {
static propTypes = {
params: PropTypes.object.isRequired,

View file

@ -12,9 +12,9 @@ const messages = defineMessages({
title: { id: 'standalone.public_title', defaultMessage: 'A look inside...' },
});
@connect()
export default @connect()
@injectIntl
export default class CommunityTimeline extends React.PureComponent {
class CommunityTimeline extends React.PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -7,8 +7,8 @@ import Column from '../../../components/column';
import ColumnHeader from '../../../components/column_header';
import { connectHashtagStream } from '../../../actions/streaming';
@connect()
export default class HashtagTimeline extends React.PureComponent {
export default @connect()
class HashtagTimeline extends React.PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -12,9 +12,9 @@ const messages = defineMessages({
title: { id: 'standalone.public_title', defaultMessage: 'A look inside...' },
});
@connect()
export default @connect()
@injectIntl
export default class PublicTimeline extends React.PureComponent {
class PublicTimeline extends React.PureComponent {
static propTypes = {
dispatch: PropTypes.func.isRequired,

View file

@ -28,8 +28,8 @@ const messages = defineMessages({
embed: { id: 'status.embed', defaultMessage: 'Embed' },
});
@injectIntl
export default class ActionBar extends React.PureComponent {
export default @injectIntl
class ActionBar extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -104,9 +104,9 @@ const makeMapStateToProps = () => {
return mapStateToProps;
};
@injectIntl
export default @injectIntl
@connect(makeMapStateToProps)
export default class Status extends ImmutablePureComponent {
class Status extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -13,8 +13,8 @@ const messages = defineMessages({
reblog: { id: 'status.reblog', defaultMessage: 'Boost' },
});
@injectIntl
export default class BoostModal extends ImmutablePureComponent {
export default @injectIntl
class BoostModal extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -35,8 +35,8 @@ const messages = defineMessages({
const shouldHideFAB = path => path.match(/^\/statuses\//);
@component => injectIntl(component, { withRef: true })
export default class ColumnsArea extends ImmutablePureComponent {
export default @(component => injectIntl(component, { withRef: true }))
class ColumnsArea extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object.isRequired,

View file

@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import Button from '../../../components/button';
@injectIntl
export default class ConfirmationModal extends React.PureComponent {
export default @injectIntl
class ConfirmationModal extends React.PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,

View file

@ -4,8 +4,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage, injectIntl } from 'react-intl';
import api from '../../../api';
@injectIntl
export default class EmbedModal extends ImmutablePureComponent {
export default @injectIntl
class EmbedModal extends ImmutablePureComponent {
static propTypes = {
url: PropTypes.string.isRequired,

View file

@ -19,8 +19,8 @@ const mapDispatchToProps = (dispatch, { id }) => ({
});
@connect(mapStateToProps, mapDispatchToProps)
export default class FocalPointModal extends ImmutablePureComponent {
export default @connect(mapStateToProps, mapDispatchToProps)
class FocalPointModal extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.map.isRequired,

View file

@ -18,8 +18,8 @@ const messages = defineMessages({
export const previewState = 'previewMediaModal';
@injectIntl
export default class MediaModal extends ImmutablePureComponent {
export default @injectIntl
class MediaModal extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.list.isRequired,

View file

@ -33,9 +33,9 @@ const mapDispatchToProps = dispatch => {
};
};
@connect(mapStateToProps, mapDispatchToProps)
export default @connect(mapStateToProps, mapDispatchToProps)
@injectIntl
export default class MuteModal extends React.PureComponent {
class MuteModal extends React.PureComponent {
static propTypes = {
isSubmitting: PropTypes.bool.isRequired,

View file

@ -177,9 +177,9 @@ const mapStateToProps = state => ({
domain: state.getIn(['meta', 'domain']),
});
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
export default class OnboardingModal extends React.PureComponent {
class OnboardingModal extends React.PureComponent {
static propTypes = {
onClose: PropTypes.func.isRequired,

View file

@ -37,9 +37,9 @@ const makeMapStateToProps = () => {
return mapStateToProps;
};
@connect(makeMapStateToProps)
export default @connect(makeMapStateToProps)
@injectIntl
export default class ReportModal extends ImmutablePureComponent {
class ReportModal extends ImmutablePureComponent {
static propTypes = {
isSubmitting: PropTypes.bool,

View file

@ -24,9 +24,9 @@ export function getLink (index) {
return links[index].props.to;
}
@injectIntl
export default @injectIntl
@withRouter
export default class TabsBar extends React.PureComponent {
class TabsBar extends React.PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,

View file

@ -187,10 +187,10 @@ class SwitchingColumnsArea extends React.PureComponent {
}
@connect(mapStateToProps)
export default @connect(mapStateToProps)
@injectIntl
@withRouter
export default class UI extends React.PureComponent {
class UI extends React.PureComponent {
static contextTypes = {
router: PropTypes.object.isRequired,

4
<