diff --git a/app/javascript/gabsocial/components/__tests__/autosuggest_emoji-test.js b/app/javascript/gabsocial/components/__tests__/autosuggest_emoji-test.js index 05616e44..80aa33a1 100644 --- a/app/javascript/gabsocial/components/__tests__/autosuggest_emoji-test.js +++ b/app/javascript/gabsocial/components/__tests__/autosuggest_emoji-test.js @@ -1,4 +1,3 @@ -import React from 'react'; import renderer from 'react-test-renderer'; import AutosuggestEmoji from '../autosuggest_emoji'; diff --git a/app/javascript/gabsocial/components/__tests__/avatar-test.js b/app/javascript/gabsocial/components/__tests__/avatar-test.js index dd3f7b7d..d4f81e27 100644 --- a/app/javascript/gabsocial/components/__tests__/avatar-test.js +++ b/app/javascript/gabsocial/components/__tests__/avatar-test.js @@ -1,4 +1,3 @@ -import React from 'react'; import renderer from 'react-test-renderer'; import { fromJS } from 'immutable'; import Avatar from '../avatar'; diff --git a/app/javascript/gabsocial/components/__tests__/avatar_overlay-test.js b/app/javascript/gabsocial/components/__tests__/avatar_overlay-test.js index 44addea8..a5b418c6 100644 --- a/app/javascript/gabsocial/components/__tests__/avatar_overlay-test.js +++ b/app/javascript/gabsocial/components/__tests__/avatar_overlay-test.js @@ -1,4 +1,3 @@ -import React from 'react'; import renderer from 'react-test-renderer'; import { fromJS } from 'immutable'; import AvatarOverlay from '../avatar_overlay'; diff --git a/app/javascript/gabsocial/components/__tests__/button-test.js b/app/javascript/gabsocial/components/__tests__/button-test.js index 160cd3cb..4bbf4eea 100644 --- a/app/javascript/gabsocial/components/__tests__/button-test.js +++ b/app/javascript/gabsocial/components/__tests__/button-test.js @@ -1,5 +1,4 @@ import { shallow } from 'enzyme'; -import React from 'react'; import renderer from 'react-test-renderer'; import Button from '../button'; diff --git a/app/javascript/gabsocial/components/__tests__/display_name-test.js b/app/javascript/gabsocial/components/__tests__/display_name-test.js index 0d040c4c..2506cc78 100644 --- a/app/javascript/gabsocial/components/__tests__/display_name-test.js +++ b/app/javascript/gabsocial/components/__tests__/display_name-test.js @@ -1,4 +1,3 @@ -import React from 'react'; import renderer from 'react-test-renderer'; import { fromJS } from 'immutable'; import DisplayName from '../display_name'; diff --git a/app/javascript/gabsocial/components/account.js b/app/javascript/gabsocial/components/account.js index a8684079..7bbeb077 100644 --- a/app/javascript/gabsocial/components/account.js +++ b/app/javascript/gabsocial/components/account.js @@ -1,6 +1,5 @@ import React, { Fragment } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import Avatar from './avatar'; import DisplayName from './display_name'; import Permalink from './permalink'; diff --git a/app/javascript/gabsocial/components/attachment_list.js b/app/javascript/gabsocial/components/attachment_list.js index 2f873ada..be3fecaa 100644 --- a/app/javascript/gabsocial/components/attachment_list.js +++ b/app/javascript/gabsocial/components/attachment_list.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Icon from 'gabsocial/components/icon'; diff --git a/app/javascript/gabsocial/components/autosuggest_emoji.js b/app/javascript/gabsocial/components/autosuggest_emoji.js index ce4383a6..035900c3 100644 --- a/app/javascript/gabsocial/components/autosuggest_emoji.js +++ b/app/javascript/gabsocial/components/autosuggest_emoji.js @@ -1,10 +1,8 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light'; const assetHost = process.env.CDN_HOST || ''; -export default class AutosuggestEmoji extends React.PureComponent { +export default class AutosuggestEmoji extends PureComponent { static propTypes = { emoji: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/autosuggest_input.js b/app/javascript/gabsocial/components/autosuggest_input.js index 3417e8b1..ff317a9b 100644 --- a/app/javascript/gabsocial/components/autosuggest_input.js +++ b/app/javascript/gabsocial/components/autosuggest_input.js @@ -1,8 +1,6 @@ -import React from 'react'; import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container'; import AutosuggestEmoji from './autosuggest_emoji'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { isRtl } from '../utils/rtl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import classNames from 'classnames'; diff --git a/app/javascript/gabsocial/components/autosuggest_textarea.js b/app/javascript/gabsocial/components/autosuggest_textarea.js index 1857af68..8a2b5e3b 100644 --- a/app/javascript/gabsocial/components/autosuggest_textarea.js +++ b/app/javascript/gabsocial/components/autosuggest_textarea.js @@ -1,8 +1,6 @@ -import React from 'react'; import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container'; import AutosuggestEmoji from './autosuggest_emoji'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { isRtl } from '../utils/rtl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Textarea from 'react-textarea-autosize'; diff --git a/app/javascript/gabsocial/components/avatar.js b/app/javascript/gabsocial/components/avatar.js index 3e08c7fe..fe0c23f0 100644 --- a/app/javascript/gabsocial/components/avatar.js +++ b/app/javascript/gabsocial/components/avatar.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { autoPlayGif } from '../initial_state'; diff --git a/app/javascript/gabsocial/components/button.js b/app/javascript/gabsocial/components/button.js index 51e2e6a7..f80747ec 100644 --- a/app/javascript/gabsocial/components/button.js +++ b/app/javascript/gabsocial/components/button.js @@ -1,8 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; -export default class Button extends React.PureComponent { +export default class Button extends PureComponent { static propTypes = { text: PropTypes.node, diff --git a/app/javascript/gabsocial/components/column.js b/app/javascript/gabsocial/components/column.js index 885f77f3..279bc4e0 100644 --- a/app/javascript/gabsocial/components/column.js +++ b/app/javascript/gabsocial/components/column.js @@ -1,7 +1,5 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -export default class Column extends React.PureComponent { +export default class Column extends PureComponent { static propTypes = { children: PropTypes.node, diff --git a/app/javascript/gabsocial/components/column_back_button.js b/app/javascript/gabsocial/components/column_back_button.js index 19e6f7ef..25429250 100644 --- a/app/javascript/gabsocial/components/column_back_button.js +++ b/app/javascript/gabsocial/components/column_back_button.js @@ -1,9 +1,7 @@ -import React from 'react'; import { FormattedMessage } from 'react-intl'; -import PropTypes from 'prop-types'; import Icon from 'gabsocial/components/icon'; -export default class ColumnBackButton extends React.PureComponent { +export default class ColumnBackButton extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/column_back_button_slim.js b/app/javascript/gabsocial/components/column_back_button_slim.js index 69e549c8..85a6b557 100644 --- a/app/javascript/gabsocial/components/column_back_button_slim.js +++ b/app/javascript/gabsocial/components/column_back_button_slim.js @@ -1,4 +1,3 @@ -import React from 'react'; import { FormattedMessage } from 'react-intl'; import ColumnBackButton from './column_back_button'; import Icon from 'gabsocial/components/icon'; diff --git a/app/javascript/gabsocial/components/column_header.js b/app/javascript/gabsocial/components/column_header.js index 499cf3c7..26d0ba57 100644 --- a/app/javascript/gabsocial/components/column_header.js +++ b/app/javascript/gabsocial/components/column_header.js @@ -1,7 +1,5 @@ 'use strict'; -import React from 'react'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'; import Icon from 'gabsocial/components/icon'; @@ -12,7 +10,7 @@ const messages = defineMessages({ }); export default @injectIntl -class ColumnHeader extends React.PureComponent { +class ColumnHeader extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/display_name.js b/app/javascript/gabsocial/components/display_name.js index 109778b5..d3b12008 100644 --- a/app/javascript/gabsocial/components/display_name.js +++ b/app/javascript/gabsocial/components/display_name.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import VerificationBadge from './verification_badge'; export default class DisplayName extends React.PureComponent { diff --git a/app/javascript/gabsocial/components/domain.js b/app/javascript/gabsocial/components/domain.js index 85729ca9..58ba508e 100644 --- a/app/javascript/gabsocial/components/domain.js +++ b/app/javascript/gabsocial/components/domain.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import IconButton from './icon_button'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/components/donor_badge.js b/app/javascript/gabsocial/components/donor_badge.js index d39ca9e0..7acc786f 100644 --- a/app/javascript/gabsocial/components/donor_badge.js +++ b/app/javascript/gabsocial/components/donor_badge.js @@ -1,4 +1,3 @@ -import React from 'react'; const DonorBadge = () => ( Donor diff --git a/app/javascript/gabsocial/components/dropdown_menu.js b/app/javascript/gabsocial/components/dropdown_menu.js index aa83b37e..eac7dd33 100644 --- a/app/javascript/gabsocial/components/dropdown_menu.js +++ b/app/javascript/gabsocial/components/dropdown_menu.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import IconButton from './icon_button'; import Overlay from 'react-overlays/lib/Overlay'; @@ -10,7 +8,7 @@ import detectPassiveEvents from 'detect-passive-events'; const listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false; let id = 0; -class DropdownMenu extends React.PureComponent { +class DropdownMenu extends PureComponent { static contextTypes = { router: PropTypes.object, @@ -164,7 +162,7 @@ class DropdownMenu extends React.PureComponent { } -export default class Dropdown extends React.PureComponent { +export default class Dropdown extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/error_boundary.js b/app/javascript/gabsocial/components/error_boundary.js index 0a400960..5050c30c 100644 --- a/app/javascript/gabsocial/components/error_boundary.js +++ b/app/javascript/gabsocial/components/error_boundary.js @@ -1,8 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; -export default class ErrorBoundary extends React.PureComponent { +export default class ErrorBoundary extends PureComponent { static propTypes = { children: PropTypes.node, diff --git a/app/javascript/gabsocial/components/extended_video_player.js b/app/javascript/gabsocial/components/extended_video_player.js index 009c0d55..3098dabf 100644 --- a/app/javascript/gabsocial/components/extended_video_player.js +++ b/app/javascript/gabsocial/components/extended_video_player.js @@ -1,7 +1,5 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -export default class ExtendedVideoPlayer extends React.PureComponent { +export default class ExtendedVideoPlayer extends PureComponent { static propTypes = { src: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/components/hashtag.js b/app/javascript/gabsocial/components/hashtag.js index ddcff27a..27f31af4 100644 --- a/app/javascript/gabsocial/components/hashtag.js +++ b/app/javascript/gabsocial/components/hashtag.js @@ -1,4 +1,3 @@ -import React from 'react'; import { Sparklines, SparklinesCurve } from 'react-sparklines'; import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/gabsocial/components/home_column_header.js b/app/javascript/gabsocial/components/home_column_header.js index 4058773c..48a56b75 100644 --- a/app/javascript/gabsocial/components/home_column_header.js +++ b/app/javascript/gabsocial/components/home_column_header.js @@ -1,8 +1,5 @@ 'use strict'; -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import classNames from 'classnames'; import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'; @@ -34,7 +31,7 @@ const mapStateToProps = state => { }; }; -class ColumnHeader extends React.PureComponent { +class ColumnHeader extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/icon.js b/app/javascript/gabsocial/components/icon.js index 8816fadf..817157bc 100644 --- a/app/javascript/gabsocial/components/icon.js +++ b/app/javascript/gabsocial/components/icon.js @@ -1,8 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; -export default class Icon extends React.PureComponent { +export default class Icon extends PureComponent { static propTypes = { id: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/components/icon_button.js b/app/javascript/gabsocial/components/icon_button.js index e30702d1..476651bd 100644 --- a/app/javascript/gabsocial/components/icon_button.js +++ b/app/javascript/gabsocial/components/icon_button.js @@ -1,11 +1,9 @@ -import React from 'react'; import Motion from '../features/ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import Icon from 'gabsocial/components/icon'; -export default class IconButton extends React.PureComponent { +export default class IconButton extends PureComponent { static propTypes = { className: PropTypes.string, diff --git a/app/javascript/gabsocial/components/icon_with_badge.js b/app/javascript/gabsocial/components/icon_with_badge.js index c42b9337..d0500723 100644 --- a/app/javascript/gabsocial/components/icon_with_badge.js +++ b/app/javascript/gabsocial/components/icon_with_badge.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Icon from 'gabsocial/components/icon'; import { shortNumberFormat } from 'gabsocial/utils/numbers'; diff --git a/app/javascript/gabsocial/components/intersection_observer_article.js b/app/javascript/gabsocial/components/intersection_observer_article.js index 3deb185a..dd6b65ea 100644 --- a/app/javascript/gabsocial/components/intersection_observer_article.js +++ b/app/javascript/gabsocial/components/intersection_observer_article.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import scheduleIdleTask from '../utils/schedule_idle_task'; import getRectFromEntry from '../utils/get_rect_from_entry'; import { is } from 'immutable'; @@ -9,7 +7,7 @@ const updateOnPropsForRendered = ['id', 'index', 'listLength']; // Diff these props in the "unrendered" state const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight']; -export default class IntersectionObserverArticle extends React.Component { +export default class IntersectionObserverArticle extends Component { static propTypes = { intersectionObserverWrapper: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/investor_badge.js b/app/javascript/gabsocial/components/investor_badge.js index 84c8efba..25b28aa5 100644 --- a/app/javascript/gabsocial/components/investor_badge.js +++ b/app/javascript/gabsocial/components/investor_badge.js @@ -1,4 +1,3 @@ -import React from 'react'; const InvestorBadge = () => ( Investor diff --git a/app/javascript/gabsocial/components/load_gap.js b/app/javascript/gabsocial/components/load_gap.js index f7cb0f15..d20cbdbe 100644 --- a/app/javascript/gabsocial/components/load_gap.js +++ b/app/javascript/gabsocial/components/load_gap.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { injectIntl, defineMessages } from 'react-intl'; import Icon from 'gabsocial/components/icon'; @@ -8,7 +6,7 @@ const messages = defineMessages({ }); export default @injectIntl -class LoadGap extends React.PureComponent { +class LoadGap extends PureComponent { static propTypes = { disabled: PropTypes.bool, diff --git a/app/javascript/gabsocial/components/load_more.js b/app/javascript/gabsocial/components/load_more.js index 389c3e1e..35658a1a 100644 --- a/app/javascript/gabsocial/components/load_more.js +++ b/app/javascript/gabsocial/components/load_more.js @@ -1,8 +1,6 @@ -import React from 'react'; import { FormattedMessage } from 'react-intl'; -import PropTypes from 'prop-types'; -export default class LoadMore extends React.PureComponent { +export default class LoadMore extends PureComponent { static propTypes = { onClick: PropTypes.func, diff --git a/app/javascript/gabsocial/components/loading_indicator.js b/app/javascript/gabsocial/components/loading_indicator.js index d6a5adb6..0750adff 100644 --- a/app/javascript/gabsocial/components/loading_indicator.js +++ b/app/javascript/gabsocial/components/loading_indicator.js @@ -1,4 +1,3 @@ -import React from 'react'; import { FormattedMessage } from 'react-intl'; const LoadingIndicator = () => ( diff --git a/app/javascript/gabsocial/components/media_gallery.js b/app/javascript/gabsocial/components/media_gallery.js index b3bb89ee..4d3f6533 100644 --- a/app/javascript/gabsocial/components/media_gallery.js +++ b/app/javascript/gabsocial/components/media_gallery.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { is } from 'immutable'; import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; @@ -13,7 +11,7 @@ const messages = defineMessages({ toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' }, }); -class Item extends React.PureComponent { +class Item extends PureComponent { static propTypes = { attachment: ImmutablePropTypes.map.isRequired, @@ -232,7 +230,7 @@ class Item extends React.PureComponent { } export default @injectIntl -class MediaGallery extends React.PureComponent { +class MediaGallery extends PureComponent { static propTypes = { sensitive: PropTypes.bool, diff --git a/app/javascript/gabsocial/components/missing_indicator.js b/app/javascript/gabsocial/components/missing_indicator.js index c4a32b30..b9eff1cc 100644 --- a/app/javascript/gabsocial/components/missing_indicator.js +++ b/app/javascript/gabsocial/components/missing_indicator.js @@ -1,4 +1,3 @@ -import React from 'react'; import { FormattedMessage } from 'react-intl'; const MissingIndicator = () => ( diff --git a/app/javascript/gabsocial/components/modal_root.js b/app/javascript/gabsocial/components/modal_root.js index fcc6278d..d00a657f 100644 --- a/app/javascript/gabsocial/components/modal_root.js +++ b/app/javascript/gabsocial/components/modal_root.js @@ -1,7 +1,4 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { injectIntl, FormattedMessage, defineMessages } from 'react-intl'; -import { connect } from 'react-redux'; import { openModal } from '../actions/modal'; import { cancelReplyCompose } from '../actions/compose'; @@ -22,7 +19,7 @@ const mapDispatchToProps = (dispatch) => ({ } }); -class ModalRoot extends React.PureComponent { +class ModalRoot extends PureComponent { static propTypes = { children: PropTypes.node, diff --git a/app/javascript/gabsocial/components/permalink.js b/app/javascript/gabsocial/components/permalink.js index b369e981..504fb685 100644 --- a/app/javascript/gabsocial/components/permalink.js +++ b/app/javascript/gabsocial/components/permalink.js @@ -1,7 +1,5 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -export default class Permalink extends React.PureComponent { +export default class Permalink extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/poll.js b/app/javascript/gabsocial/components/poll.js index 9e98a8f3..404686ec 100644 --- a/app/javascript/gabsocial/components/poll.js +++ b/app/javascript/gabsocial/components/poll.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; diff --git a/app/javascript/gabsocial/components/pro_badge.js b/app/javascript/gabsocial/components/pro_badge.js index 151492ce..c56b251d 100644 --- a/app/javascript/gabsocial/components/pro_badge.js +++ b/app/javascript/gabsocial/components/pro_badge.js @@ -1,4 +1,3 @@ -import React from 'react'; const ProBadge = () => ( Pro diff --git a/app/javascript/gabsocial/components/relative_timestamp.js b/app/javascript/gabsocial/components/relative_timestamp.js index aa4b73cf..2c627f1c 100644 --- a/app/javascript/gabsocial/components/relative_timestamp.js +++ b/app/javascript/gabsocial/components/relative_timestamp.js @@ -1,6 +1,4 @@ -import React from 'react'; import { injectIntl, defineMessages } from 'react-intl'; -import PropTypes from 'prop-types'; const messages = defineMessages({ just_now: { id: 'relative_time.just_now', defaultMessage: 'now' }, @@ -112,7 +110,7 @@ const timeRemainingString = (intl, date, now) => { }; export default @injectIntl -class RelativeTimestamp extends React.Component { +class RelativeTimestamp extends Component { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/scrollable_list.js b/app/javascript/gabsocial/components/scrollable_list.js index c526f5f7..0417ce32 100644 --- a/app/javascript/gabsocial/components/scrollable_list.js +++ b/app/javascript/gabsocial/components/scrollable_list.js @@ -1,5 +1,4 @@ import React, { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import IntersectionObserverArticleContainer from '../containers/intersection_observer_article_container'; import LoadMore from './load_more'; import IntersectionObserverWrapper from '../features/ui/util/intersection_observer_wrapper'; diff --git a/app/javascript/gabsocial/components/setting_text.js b/app/javascript/gabsocial/components/setting_text.js index a6dde4c0..a92852dd 100644 --- a/app/javascript/gabsocial/components/setting_text.js +++ b/app/javascript/gabsocial/components/setting_text.js @@ -1,8 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -export default class SettingText extends React.PureComponent { +export default class SettingText extends PureComponent { static propTypes = { settings: ImmutablePropTypes.map.isRequired, diff --git a/app/javascript/gabsocial/components/status.js b/app/javascript/gabsocial/components/status.js index 61a5a06c..03b25ede 100644 --- a/app/javascript/gabsocial/components/status.js +++ b/app/javascript/gabsocial/components/status.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import Avatar from './avatar'; import AvatarOverlay from './avatar_overlay'; import AvatarComposite from './avatar_composite'; diff --git a/app/javascript/gabsocial/components/status_action_bar.js b/app/javascript/gabsocial/components/status_action_bar.js index e65fd689..e64acd52 100644 --- a/app/javascript/gabsocial/components/status_action_bar.js +++ b/app/javascript/gabsocial/components/status_action_bar.js @@ -1,8 +1,5 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import IconButton from './icon_button'; import DropdownMenuContainer from '../containers/dropdown_menu_container'; import { defineMessages, injectIntl } from 'react-intl'; diff --git a/app/javascript/gabsocial/components/status_content.js b/app/javascript/gabsocial/components/status_content.js index 838bdf1d..c1d1dd6f 100644 --- a/app/javascript/gabsocial/components/status_content.js +++ b/app/javascript/gabsocial/components/status_content.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { isRtl } from '../utils/rtl'; import { FormattedMessage } from 'react-intl'; import Permalink from './permalink'; @@ -9,7 +7,7 @@ import Icon from 'gabsocial/components/icon'; const MAX_HEIGHT = 642; // 20px * 32 (+ 2px padding at the top) -export default class StatusContent extends React.PureComponent { +export default class StatusContent extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/status_list.js b/app/javascript/gabsocial/components/status_list.js index b1ed75d6..9db63072 100644 --- a/app/javascript/gabsocial/components/status_list.js +++ b/app/javascript/gabsocial/components/status_list.js @@ -1,8 +1,6 @@ import { debounce } from 'lodash'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import StatusContainer from '../containers/status_container'; import ImmutablePureComponent from 'react-immutable-pure-component'; import LoadGap from './load_gap'; diff --git a/app/javascript/gabsocial/components/timeline_queue_button_header.js b/app/javascript/gabsocial/components/timeline_queue_button_header.js index f50e736f..922d3ab2 100644 --- a/app/javascript/gabsocial/components/timeline_queue_button_header.js +++ b/app/javascript/gabsocial/components/timeline_queue_button_header.js @@ -1,10 +1,8 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { shortNumberFormat } from '../utils/numbers'; import classNames from 'classnames'; -export default class TimelineQueueButtonHeader extends React.PureComponent { +export default class TimelineQueueButtonHeader extends PureComponent { static propTypes = { onClick: PropTypes.func.isRequired, count: PropTypes.number, diff --git a/app/javascript/gabsocial/components/verification_badge.js b/app/javascript/gabsocial/components/verification_badge.js index de1e252e..77d41259 100644 --- a/app/javascript/gabsocial/components/verification_badge.js +++ b/app/javascript/gabsocial/components/verification_badge.js @@ -1,4 +1,3 @@ -import React from 'react'; import Icon from './icon'; const VerificationBadge = () => ( diff --git a/app/javascript/gabsocial/containers/account_container.js b/app/javascript/gabsocial/containers/account_container.js index 5a5136dd..cfbe3d0a 100644 --- a/app/javascript/gabsocial/containers/account_container.js +++ b/app/javascript/gabsocial/containers/account_container.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { makeGetAccount } from '../selectors'; import Account from '../components/account'; diff --git a/app/javascript/gabsocial/containers/compose_container.js b/app/javascript/gabsocial/containers/compose_container.js index 7bc7bbaa..ca7e0d17 100644 --- a/app/javascript/gabsocial/containers/compose_container.js +++ b/app/javascript/gabsocial/containers/compose_container.js @@ -1,6 +1,4 @@ -import React from 'react'; import { Provider } from 'react-redux'; -import PropTypes from 'prop-types'; import configureStore from '../store/configureStore'; import { hydrateStore } from '../actions/store'; import { IntlProvider, addLocaleData } from 'react-intl'; @@ -20,7 +18,7 @@ if (initialState) { store.dispatch(fetchCustomEmojis()); -export default class TimelineContainer extends React.PureComponent { +export default class TimelineContainer extends PureComponent { static propTypes = { locale: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/containers/domain_container.js b/app/javascript/gabsocial/containers/domain_container.js index 813178bb..2a9d6300 100644 --- a/app/javascript/gabsocial/containers/domain_container.js +++ b/app/javascript/gabsocial/containers/domain_container.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { blockDomain, unblockDomain } from '../actions/domain_blocks'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Domain from '../components/domain'; diff --git a/app/javascript/gabsocial/containers/dropdown_menu_container.js b/app/javascript/gabsocial/containers/dropdown_menu_container.js index ef52ceb2..46a6dae5 100644 --- a/app/javascript/gabsocial/containers/dropdown_menu_container.js +++ b/app/javascript/gabsocial/containers/dropdown_menu_container.js @@ -1,6 +1,5 @@ import { openDropdownMenu, closeDropdownMenu } from '../actions/dropdown_menu'; import { openModal, closeModal } from '../actions/modal'; -import { connect } from 'react-redux'; import DropdownMenu from '../components/dropdown_menu'; import { isUserTouching } from '../utils/is_mobile'; diff --git a/app/javascript/gabsocial/containers/gabsocial.js b/app/javascript/gabsocial/containers/gabsocial.js index 2e63c305..a60bfdb2 100644 --- a/app/javascript/gabsocial/containers/gabsocial.js +++ b/app/javascript/gabsocial/containers/gabsocial.js @@ -1,8 +1,6 @@ 'use strict'; -import React from 'react'; import { Provider, connect } from 'react-redux'; -import PropTypes from 'prop-types'; import configureStore from '../store/configureStore'; import { INTRODUCTION_VERSION } from '../actions/onboarding'; import { BrowserRouter, Route } from 'react-router-dom'; @@ -37,7 +35,7 @@ const mapStateToProps = (state) => { } @connect(mapStateToProps) -class GabSocialMount extends React.PureComponent { +class GabSocialMount extends PureComponent { static propTypes = { showIntroduction: PropTypes.bool, @@ -62,7 +60,7 @@ class GabSocialMount extends React.PureComponent { } -export default class GabSocial extends React.PureComponent { +export default class GabSocial extends PureComponent { static propTypes = { locale: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/containers/intersection_observer_article_container.js b/app/javascript/gabsocial/containers/intersection_observer_article_container.js index b6f16219..a44c6654 100644 --- a/app/javascript/gabsocial/containers/intersection_observer_article_container.js +++ b/app/javascript/gabsocial/containers/intersection_observer_article_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import IntersectionObserverArticle from '../components/intersection_observer_article'; import { setHeight } from '../actions/height_cache'; diff --git a/app/javascript/gabsocial/containers/media_container.js b/app/javascript/gabsocial/containers/media_container.js index e9aa7578..74f4d4a7 100644 --- a/app/javascript/gabsocial/containers/media_container.js +++ b/app/javascript/gabsocial/containers/media_container.js @@ -1,6 +1,5 @@ import React, { PureComponent, Fragment } from 'react'; import ReactDOM from 'react-dom'; -import PropTypes from 'prop-types'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; import MediaGallery from '../components/media_gallery'; diff --git a/app/javascript/gabsocial/containers/poll_container.js b/app/javascript/gabsocial/containers/poll_container.js index e094a03f..b0ba3d61 100644 --- a/app/javascript/gabsocial/containers/poll_container.js +++ b/app/javascript/gabsocial/containers/poll_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import Poll from 'gabsocial/components/poll'; const mapStateToProps = (state, { pollId }) => ({ diff --git a/app/javascript/gabsocial/containers/status_container.js b/app/javascript/gabsocial/containers/status_container.js index f4bfc496..0c8f4a40 100644 --- a/app/javascript/gabsocial/containers/status_container.js +++ b/app/javascript/gabsocial/containers/status_container.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import Status from '../components/status'; import { makeGetStatus } from '../selectors'; import { diff --git a/app/javascript/gabsocial/containers/timeline_container.js b/app/javascript/gabsocial/containers/timeline_container.js index 54f8eb31..dedbbdbf 100644 --- a/app/javascript/gabsocial/containers/timeline_container.js +++ b/app/javascript/gabsocial/containers/timeline_container.js @@ -1,7 +1,6 @@ import React, { Fragment } from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; -import PropTypes from 'prop-types'; import configureStore from '../store/configureStore'; import { hydrateStore } from '../actions/store'; import { IntlProvider, addLocaleData } from 'react-intl'; @@ -20,7 +19,7 @@ if (initialState) { store.dispatch(hydrateStore(initialState)); } -export default class TimelineContainer extends React.PureComponent { +export default class TimelineContainer extends PureComponent { static propTypes = { locale: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/features/account/components/header.js b/app/javascript/gabsocial/features/account/components/header.js index e37e7513..610175bf 100644 --- a/app/javascript/gabsocial/features/account/components/header.js +++ b/app/javascript/gabsocial/features/account/components/header.js @@ -1,8 +1,6 @@ 'use strict'; -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Button from 'gabsocial/components/button'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/features/account_gallery/components/media_item.js b/app/javascript/gabsocial/features/account_gallery/components/media_item.js index f11d5c22..2a74ce5c 100644 --- a/app/javascript/gabsocial/features/account_gallery/components/media_item.js +++ b/app/javascript/gabsocial/features/account_gallery/components/media_item.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Icon from 'gabsocial/components/icon'; diff --git a/app/javascript/gabsocial/features/account_gallery/index.js b/app/javascript/gabsocial/features/account_gallery/index.js index 9c2fc52e..7a4ad3e0 100644 --- a/app/javascript/gabsocial/features/account_gallery/index.js +++ b/app/javascript/gabsocial/features/account_gallery/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { fetchAccount, fetchAccountByUsername, diff --git a/app/javascript/gabsocial/features/account_timeline/components/header.js b/app/javascript/gabsocial/features/account_timeline/components/header.js index ed1e0900..597d8527 100644 --- a/app/javascript/gabsocial/features/account_timeline/components/header.js +++ b/app/javascript/gabsocial/features/account_timeline/components/header.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import InnerHeader from '../../account/components/header'; import ImmutablePureComponent from 'react-immutable-pure-component'; import MovedNote from './moved_note'; diff --git a/app/javascript/gabsocial/features/account_timeline/components/moved_note.js b/app/javascript/gabsocial/features/account_timeline/components/moved_note.js index 95a4a371..cf118887 100644 --- a/app/javascript/gabsocial/features/account_timeline/components/moved_note.js +++ b/app/javascript/gabsocial/features/account_timeline/components/moved_note.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/features/account_timeline/containers/header_container.js b/app/javascript/gabsocial/features/account_timeline/containers/header_container.js index 4d4ae6e8..1863489f 100644 --- a/app/javascript/gabsocial/features/account_timeline/containers/header_container.js +++ b/app/javascript/gabsocial/features/account_timeline/containers/header_container.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { makeGetAccount } from '../../../selectors'; import Header from '../components/header'; import { diff --git a/app/javascript/gabsocial/features/account_timeline/index.js b/app/javascript/gabsocial/features/account_timeline/index.js index 6a2aad89..8a269ec9 100644 --- a/app/javascript/gabsocial/features/account_timeline/index.js +++ b/app/javascript/gabsocial/features/account_timeline/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { fetchAccount, fetchAccountByUsername } from '../../actions/accounts'; import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines'; import StatusList from '../../components/status_list'; diff --git a/app/javascript/gabsocial/features/blocks/index.js b/app/javascript/gabsocial/features/blocks/index.js index 38c4e2f8..02229427 100644 --- a/app/javascript/gabsocial/features/blocks/index.js +++ b/app/javascript/gabsocial/features/blocks/index.js @@ -1,10 +1,7 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; -import PropTypes from 'prop-types'; import LoadingIndicator from '../../components/loading_indicator'; import Column from '../ui/components/column'; import AccountContainer from '../../containers/account_container'; diff --git a/app/javascript/gabsocial/features/community_timeline/components/column_settings.js b/app/javascript/gabsocial/features/community_timeline/components/column_settings.js index 66e9269f..9f95cff7 100644 --- a/app/javascript/gabsocial/features/community_timeline/components/column_settings.js +++ b/app/javascript/gabsocial/features/community_timeline/components/column_settings.js @@ -1,11 +1,9 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl, FormattedMessage } from 'react-intl'; import SettingToggle from '../../notifications/components/setting_toggle'; export default @injectIntl -class ColumnSettings extends React.PureComponent { +class ColumnSettings extends PureComponent { static propTypes = { settings: ImmutablePropTypes.map.isRequired, diff --git a/app/javascript/gabsocial/features/community_timeline/containers/column_settings_container.js b/app/javascript/gabsocial/features/community_timeline/containers/column_settings_container.js index 0a756197..460bb52f 100644 --- a/app/javascript/gabsocial/features/community_timeline/containers/column_settings_container.js +++ b/app/javascript/gabsocial/features/community_timeline/containers/column_settings_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import ColumnSettings from '../components/column_settings'; import { changeSetting } from '../../../actions/settings'; diff --git a/app/javascript/gabsocial/features/community_timeline/index.js b/app/javascript/gabsocial/features/community_timeline/index.js index 6b59339c..086fe684 100644 --- a/app/javascript/gabsocial/features/community_timeline/index.js +++ b/app/javascript/gabsocial/features/community_timeline/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import ColumnSettingsContainer from './containers/column_settings_container'; @@ -35,7 +32,7 @@ const mapStateToProps = state => { export default @connect(mapStateToProps) @injectIntl -class CommunityTimeline extends React.PureComponent { +class CommunityTimeline extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/features/compose/components/action_bar.js b/app/javascript/gabsocial/features/compose/components/action_bar.js index 06c12e4b..20edbff4 100644 --- a/app/javascript/gabsocial/features/compose/components/action_bar.js +++ b/app/javascript/gabsocial/features/compose/components/action_bar.js @@ -1,8 +1,5 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { openModal } from '../../../actions/modal'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import DropdownMenuContainer from '../../../containers/dropdown_menu_container'; import { defineMessages, injectIntl } from 'react-intl'; import { meUsername } from 'gabsocial/initial_state'; @@ -25,7 +22,7 @@ const mapDispatchToProps = (dispatch) => ({ }, }); -class ActionBar extends React.PureComponent { +class ActionBar extends PureComponent { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/features/compose/components/autosuggest_account.js b/app/javascript/gabsocial/features/compose/components/autosuggest_account.js index 1451be0e..30afeb0e 100644 --- a/app/javascript/gabsocial/features/compose/components/autosuggest_account.js +++ b/app/javascript/gabsocial/features/compose/components/autosuggest_account.js @@ -1,4 +1,3 @@ -import React from 'react'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/gabsocial/features/compose/components/character_counter.js b/app/javascript/gabsocial/features/compose/components/character_counter.js index 0ecfc914..fca65487 100644 --- a/app/javascript/gabsocial/features/compose/components/character_counter.js +++ b/app/javascript/gabsocial/features/compose/components/character_counter.js @@ -1,8 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { length } from 'stringz'; -export default class CharacterCounter extends React.PureComponent { +export default class CharacterCounter extends PureComponent { static propTypes = { text: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/features/compose/components/compose_form.js b/app/javascript/gabsocial/features/compose/components/compose_form.js index a7c8e086..0035d6e6 100644 --- a/app/javascript/gabsocial/features/compose/components/compose_form.js +++ b/app/javascript/gabsocial/features/compose/components/compose_form.js @@ -1,8 +1,6 @@ -import React from 'react'; import CharacterCounter from './character_counter'; import Button from '../../../components/button'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import ReplyIndicatorContainer from '../containers/reply_indicator_container'; import AutosuggestTextarea from '../../../components/autosuggest_textarea'; diff --git a/app/javascript/gabsocial/features/compose/components/emoji_picker_dropdown.js b/app/javascript/gabsocial/features/compose/components/emoji_picker_dropdown.js index c1429c75..d5b9c497 100644 --- a/app/javascript/gabsocial/features/compose/components/emoji_picker_dropdown.js +++ b/app/javascript/gabsocial/features/compose/components/emoji_picker_dropdown.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components'; import Overlay from 'react-overlays/lib/Overlay'; @@ -44,7 +42,7 @@ const categoriesSort = [ 'flags', ]; -class ModifierPickerMenu extends React.PureComponent { +class ModifierPickerMenu extends PureComponent { static propTypes = { active: PropTypes.bool, @@ -105,7 +103,7 @@ class ModifierPickerMenu extends React.PureComponent { } -class ModifierPicker extends React.PureComponent { +class ModifierPicker extends PureComponent { static propTypes = { active: PropTypes.bool, @@ -142,7 +140,7 @@ class ModifierPicker extends React.PureComponent { } @injectIntl -class EmojiPickerMenu extends React.PureComponent { +class EmojiPickerMenu extends PureComponent { static propTypes = { custom_emojis: ImmutablePropTypes.list, @@ -279,7 +277,7 @@ class EmojiPickerMenu extends React.PureComponent { } export default @injectIntl -class EmojiPickerDropdown extends React.PureComponent { +class EmojiPickerDropdown extends PureComponent { static propTypes = { custom_emojis: ImmutablePropTypes.list, diff --git a/app/javascript/gabsocial/features/compose/components/navigation_bar.js b/app/javascript/gabsocial/features/compose/components/navigation_bar.js index d03d8d95..76c87522 100644 --- a/app/javascript/gabsocial/features/compose/components/navigation_bar.js +++ b/app/javascript/gabsocial/features/compose/components/navigation_bar.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ActionBar from './action_bar'; import Avatar from '../../../components/avatar'; diff --git a/app/javascript/gabsocial/features/compose/components/poll_button.js b/app/javascript/gabsocial/features/compose/components/poll_button.js index 76f96bfa..de7fad86 100644 --- a/app/javascript/gabsocial/features/compose/components/poll_button.js +++ b/app/javascript/gabsocial/features/compose/components/poll_button.js @@ -1,6 +1,4 @@ -import React from 'react'; import IconButton from '../../../components/icon_button'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; const messages = defineMessages({ @@ -15,7 +13,7 @@ const iconStyle = { export default @injectIntl -class PollButton extends React.PureComponent { +class PollButton extends PureComponent { static propTypes = { disabled: PropTypes.bool, diff --git a/app/javascript/gabsocial/features/compose/components/poll_form.js b/app/javascript/gabsocial/features/compose/components/poll_form.js index e8a1877a..c41f41dc 100644 --- a/app/javascript/gabsocial/features/compose/components/poll_form.js +++ b/app/javascript/gabsocial/features/compose/components/poll_form.js @@ -1,7 +1,5 @@ 'use strict'; -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; @@ -21,7 +19,7 @@ const messages = defineMessages({ }); @injectIntl -class Option extends React.PureComponent { +class Option extends PureComponent { static propTypes = { title: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/features/compose/components/privacy_dropdown.js b/app/javascript/gabsocial/features/compose/components/privacy_dropdown.js index 883a663d..136633e7 100644 --- a/app/javascript/gabsocial/features/compose/components/privacy_dropdown.js +++ b/app/javascript/gabsocial/features/compose/components/privacy_dropdown.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { injectIntl, defineMessages } from 'react-intl'; import IconButton from '../../../components/icon_button'; import Overlay from 'react-overlays/lib/Overlay'; @@ -22,7 +20,7 @@ const messages = defineMessages({ const listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false; -class PrivacyDropdownMenu extends React.PureComponent { +class PrivacyDropdownMenu extends PureComponent { static propTypes = { style: PropTypes.object, @@ -150,7 +148,7 @@ class PrivacyDropdownMenu extends React.PureComponent { } export default @injectIntl -class PrivacyDropdown extends React.PureComponent { +class PrivacyDropdown extends PureComponent { static propTypes = { isUserTouching: PropTypes.func, diff --git a/app/javascript/gabsocial/features/compose/components/reply_indicator.js b/app/javascript/gabsocial/features/compose/components/reply_indicator.js index 951e5b1f..c666cece 100644 --- a/app/javascript/gabsocial/features/compose/components/reply_indicator.js +++ b/app/javascript/gabsocial/features/compose/components/reply_indicator.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import Avatar from '../../../components/avatar'; import IconButton from '../../../components/icon_button'; import DisplayName from '../../../components/display_name'; diff --git a/app/javascript/gabsocial/features/compose/components/search.js b/app/javascript/gabsocial/features/compose/components/search.js index a0c95584..a6cce001 100644 --- a/app/javascript/gabsocial/features/compose/components/search.js +++ b/app/javascript/gabsocial/features/compose/components/search.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Overlay from 'react-overlays/lib/Overlay'; import Motion from '../../ui/util/optional_motion'; @@ -11,7 +9,7 @@ const messages = defineMessages({ placeholder: { id: 'search.placeholder', defaultMessage: 'Search' }, }); -class SearchPopout extends React.PureComponent { +class SearchPopout extends PureComponent { static propTypes = { style: PropTypes.object, @@ -43,7 +41,7 @@ class SearchPopout extends React.PureComponent { } export default @injectIntl -class Search extends React.PureComponent { +class Search extends PureComponent { static contextTypes = { router: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/features/compose/components/search_results.js b/app/javascript/gabsocial/features/compose/components/search_results.js index de876c84..81e8686a 100644 --- a/app/javascript/gabsocial/features/compose/components/search_results.js +++ b/app/javascript/gabsocial/features/compose/components/search_results.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import AccountContainer from '../../../containers/account_container'; diff --git a/app/javascript/gabsocial/features/compose/components/text_icon_button.js b/app/javascript/gabsocial/features/compose/components/text_icon_button.js index 9c8ffab1..673d21f4 100644 --- a/app/javascript/gabsocial/features/compose/components/text_icon_button.js +++ b/app/javascript/gabsocial/features/compose/components/text_icon_button.js @@ -1,7 +1,5 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -export default class TextIconButton extends React.PureComponent { +export default class TextIconButton extends PureComponent { static propTypes = { label: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/features/compose/components/upload.js b/app/javascript/gabsocial/features/compose/components/upload.js index e79eb64f..a311faa0 100644 --- a/app/javascript/gabsocial/features/compose/components/upload.js +++ b/app/javascript/gabsocial/features/compose/components/upload.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/features/compose/components/upload_button.js b/app/javascript/gabsocial/features/compose/components/upload_button.js index 90e2769f..11931185 100644 --- a/app/javascript/gabsocial/features/compose/components/upload_button.js +++ b/app/javascript/gabsocial/features/compose/components/upload_button.js @@ -1,8 +1,5 @@ -import React from 'react'; import IconButton from '../../../components/icon_button'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/gabsocial/features/compose/components/upload_form.js b/app/javascript/gabsocial/features/compose/components/upload_form.js index 9ff2aa0f..bfa72825 100644 --- a/app/javascript/gabsocial/features/compose/components/upload_form.js +++ b/app/javascript/gabsocial/features/compose/components/upload_form.js @@ -1,4 +1,3 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import UploadProgressContainer from '../containers/upload_progress_container'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/features/compose/components/upload_progress.js b/app/javascript/gabsocial/features/compose/components/upload_progress.js index 6d0410a8..989cfa19 100644 --- a/app/javascript/gabsocial/features/compose/components/upload_progress.js +++ b/app/javascript/gabsocial/features/compose/components/upload_progress.js @@ -1,11 +1,9 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import { FormattedMessage } from 'react-intl'; import Icon from 'gabsocial/components/icon'; -export default class UploadProgress extends React.PureComponent { +export default class UploadProgress extends PureComponent { static propTypes = { active: PropTypes.bool, diff --git a/app/javascript/gabsocial/features/compose/components/warning.js b/app/javascript/gabsocial/features/compose/components/warning.js index 803b7f86..9340a0e5 100644 --- a/app/javascript/gabsocial/features/compose/components/warning.js +++ b/app/javascript/gabsocial/features/compose/components/warning.js @@ -1,9 +1,7 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; -export default class Warning extends React.PureComponent { +export default class Warning extends PureComponent { static propTypes = { message: PropTypes.node.isRequired, diff --git a/app/javascript/gabsocial/features/compose/containers/autosuggest_account_container.js b/app/javascript/gabsocial/features/compose/containers/autosuggest_account_container.js index 4190e54c..4c7673a7 100644 --- a/app/javascript/gabsocial/features/compose/containers/autosuggest_account_container.js +++ b/app/javascript/gabsocial/features/compose/containers/autosuggest_account_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import AutosuggestAccount from '../components/autosuggest_account'; import { makeGetAccount } from '../../../selectors'; diff --git a/app/javascript/gabsocial/features/compose/containers/compose_form_container.js b/app/javascript/gabsocial/features/compose/containers/compose_form_container.js index c7c5618d..20c40387 100644 --- a/app/javascript/gabsocial/features/compose/containers/compose_form_container.js +++ b/app/javascript/gabsocial/features/compose/containers/compose_form_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import ComposeForm from '../components/compose_form'; import { changeCompose, diff --git a/app/javascript/gabsocial/features/compose/containers/emoji_picker_dropdown_container.js b/app/javascript/gabsocial/features/compose/containers/emoji_picker_dropdown_container.js index 5ec937a3..8e879f07 100644 --- a/app/javascript/gabsocial/features/compose/containers/emoji_picker_dropdown_container.js +++ b/app/javascript/gabsocial/features/compose/containers/emoji_picker_dropdown_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import EmojiPickerDropdown from '../components/emoji_picker_dropdown'; import { changeSetting } from '../../../actions/settings'; import { createSelector } from 'reselect'; diff --git a/app/javascript/gabsocial/features/compose/containers/poll_button_container.js b/app/javascript/gabsocial/features/compose/containers/poll_button_container.js index 8f1cb7c1..6fda3485 100644 --- a/app/javascript/gabsocial/features/compose/containers/poll_button_container.js +++ b/app/javascript/gabsocial/features/compose/containers/poll_button_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import PollButton from '../components/poll_button'; import { addPoll, removePoll } from '../../../actions/compose'; diff --git a/app/javascript/gabsocial/features/compose/containers/poll_form_container.js b/app/javascript/gabsocial/features/compose/containers/poll_form_container.js index 1401371d..7b6cc021 100644 --- a/app/javascript/gabsocial/features/compose/containers/poll_form_container.js +++ b/app/javascript/gabsocial/features/compose/containers/poll_form_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import PollForm from '../components/poll_form'; import { addPollOption, removePollOption, changePollOption, changePollSettings } from '../../../actions/compose'; import { diff --git a/app/javascript/gabsocial/features/compose/containers/privacy_dropdown_container.js b/app/javascript/gabsocial/features/compose/containers/privacy_dropdown_container.js index 9c278b07..de4a2fc5 100644 --- a/app/javascript/gabsocial/features/compose/containers/privacy_dropdown_container.js +++ b/app/javascript/gabsocial/features/compose/containers/privacy_dropdown_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import PrivacyDropdown from '../components/privacy_dropdown'; import { changeComposeVisibility } from '../../../actions/compose'; import { openModal, closeModal } from '../../../actions/modal'; diff --git a/app/javascript/gabsocial/features/compose/containers/reply_indicator_container.js b/app/javascript/gabsocial/features/compose/containers/reply_indicator_container.js index 5eb1eb72..2428b4b7 100644 --- a/app/javascript/gabsocial/features/compose/containers/reply_indicator_container.js +++ b/app/javascript/gabsocial/features/compose/containers/reply_indicator_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import { cancelReplyCompose } from '../../../actions/compose'; import { makeGetStatus } from '../../../selectors'; import ReplyIndicator from '../components/reply_indicator'; diff --git a/app/javascript/gabsocial/features/compose/containers/search_container.js b/app/javascript/gabsocial/features/compose/containers/search_container.js index 392bd0f5..5f0f185b 100644 --- a/app/javascript/gabsocial/features/compose/containers/search_container.js +++ b/app/javascript/gabsocial/features/compose/containers/search_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import { changeSearch, clearSearch, diff --git a/app/javascript/gabsocial/features/compose/containers/search_results_container.js b/app/javascript/gabsocial/features/compose/containers/search_results_container.js index f9637861..71779914 100644 --- a/app/javascript/gabsocial/features/compose/containers/search_results_container.js +++ b/app/javascript/gabsocial/features/compose/containers/search_results_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import SearchResults from '../components/search_results'; import { fetchSuggestions, dismissSuggestion } from '../../../actions/suggestions'; diff --git a/app/javascript/gabsocial/features/compose/containers/sensitive_button_container.js b/app/javascript/gabsocial/features/compose/containers/sensitive_button_container.js index 8cc20f85..1d09f306 100644 --- a/app/javascript/gabsocial/features/compose/containers/sensitive_button_container.js +++ b/app/javascript/gabsocial/features/compose/containers/sensitive_button_container.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import { changeComposeSensitivity } from 'gabsocial/actions/compose'; import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; @@ -23,7 +20,7 @@ const mapDispatchToProps = dispatch => ({ }); -class SensitiveButton extends React.PureComponent { +class SensitiveButton extends PureComponent { static propTypes = { active: PropTypes.bool, diff --git a/app/javascript/gabsocial/features/compose/containers/spoiler_button_container.js b/app/javascript/gabsocial/features/compose/containers/spoiler_button_container.js index 0b9dc8df..b7aca741 100644 --- a/app/javascript/gabsocial/features/compose/containers/spoiler_button_container.js +++ b/app/javascript/gabsocial/features/compose/containers/spoiler_button_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import TextIconButton from '../components/text_icon_button'; import { changeComposeSpoilerness } from '../../../actions/compose'; import { injectIntl, defineMessages } from 'react-intl'; diff --git a/app/javascript/gabsocial/features/compose/containers/upload_button_container.js b/app/javascript/gabsocial/features/compose/containers/upload_button_container.js index d8b8c4b6..03b0c552 100644 --- a/app/javascript/gabsocial/features/compose/containers/upload_button_container.js +++ b/app/javascript/gabsocial/features/compose/containers/upload_button_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import UploadButton from '../components/upload_button'; import { uploadCompose } from '../../../actions/compose'; diff --git a/app/javascript/gabsocial/features/compose/containers/upload_container.js b/app/javascript/gabsocial/features/compose/containers/upload_container.js index b6d81f03..476328c4 100644 --- a/app/javascript/gabsocial/features/compose/containers/upload_container.js +++ b/app/javascript/gabsocial/features/compose/containers/upload_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import Upload from '../components/upload'; import { undoUploadCompose, changeUploadCompose } from '../../../actions/compose'; import { openModal } from '../../../actions/modal'; diff --git a/app/javascript/gabsocial/features/compose/containers/upload_form_container.js b/app/javascript/gabsocial/features/compose/containers/upload_form_container.js index a6798bf5..a1e1ba90 100644 --- a/app/javascript/gabsocial/features/compose/containers/upload_form_container.js +++ b/app/javascript/gabsocial/features/compose/containers/upload_form_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import UploadForm from '../components/upload_form'; const mapStateToProps = state => ({ diff --git a/app/javascript/gabsocial/features/compose/containers/upload_progress_container.js b/app/javascript/gabsocial/features/compose/containers/upload_progress_container.js index 0cfee96d..ec3658f1 100644 --- a/app/javascript/gabsocial/features/compose/containers/upload_progress_container.js +++ b/app/javascript/gabsocial/features/compose/containers/upload_progress_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import UploadProgress from '../components/upload_progress'; const mapStateToProps = state => ({ diff --git a/app/javascript/gabsocial/features/compose/containers/warning_container.js b/app/javascript/gabsocial/features/compose/containers/warning_container.js index b879cd89..46135c42 100644 --- a/app/javascript/gabsocial/features/compose/containers/warning_container.js +++ b/app/javascript/gabsocial/features/compose/containers/warning_container.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import Warning from '../components/warning'; -import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { me } from '../../../initial_state'; diff --git a/app/javascript/gabsocial/features/compose/index.js b/app/javascript/gabsocial/features/compose/index.js index 347a3808..4e94e8c0 100644 --- a/app/javascript/gabsocial/features/compose/index.js +++ b/app/javascript/gabsocial/features/compose/index.js @@ -1,9 +1,6 @@ -import React from 'react'; import ComposeFormContainer from './containers/compose_form_container'; import NavigationContainer from './containers/navigation_container'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { connect } from 'react-redux'; import { mountCompose, unmountCompose } from '../../actions/compose'; import { Link } from 'react-router-dom'; import { injectIntl, defineMessages } from 'react-intl'; @@ -34,7 +31,7 @@ const mapStateToProps = (state, ownProps) => ({ export default @connect(mapStateToProps) @injectIntl -class Compose extends React.PureComponent { +class Compose extends PureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/direct_timeline/components/conversation.js b/app/javascript/gabsocial/features/direct_timeline/components/conversation.js index 74119b15..f13a55bd 100644 --- a/app/javascript/gabsocial/features/direct_timeline/components/conversation.js +++ b/app/javascript/gabsocial/features/direct_timeline/components/conversation.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import StatusContainer from '../../../containers/status_container'; diff --git a/app/javascript/gabsocial/features/direct_timeline/components/conversations_list.js b/app/javascript/gabsocial/features/direct_timeline/components/conversations_list.js index 850e4282..f9cad0b2 100644 --- a/app/javascript/gabsocial/features/direct_timeline/components/conversations_list.js +++ b/app/javascript/gabsocial/features/direct_timeline/components/conversations_list.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ConversationContainer from '../containers/conversation_container'; diff --git a/app/javascript/gabsocial/features/direct_timeline/containers/conversation_container.js b/app/javascript/gabsocial/features/direct_timeline/containers/conversation_container.js index bd6f6bfb..be84b8d4 100644 --- a/app/javascript/gabsocial/features/direct_timeline/containers/conversation_container.js +++ b/app/javascript/gabsocial/features/direct_timeline/containers/conversation_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import Conversation from '../components/conversation'; import { markConversationRead } from '../../../actions/conversations'; diff --git a/app/javascript/gabsocial/features/direct_timeline/containers/conversations_list_container.js b/app/javascript/gabsocial/features/direct_timeline/containers/conversations_list_container.js index 57e17d96..13b0be5d 100644 --- a/app/javascript/gabsocial/features/direct_timeline/containers/conversations_list_container.js +++ b/app/javascript/gabsocial/features/direct_timeline/containers/conversations_list_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import ConversationsList from '../components/conversations_list'; import { expandConversations } from '../../../actions/conversations'; diff --git a/app/javascript/gabsocial/features/direct_timeline/index.js b/app/javascript/gabsocial/features/direct_timeline/index.js index 1b82ae30..23a29d02 100644 --- a/app/javascript/gabsocial/features/direct_timeline/index.js +++ b/app/javascript/gabsocial/features/direct_timeline/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; import { mountConversations, unmountConversations, expandConversations } from '../../actions/conversations'; @@ -14,7 +11,7 @@ const messages = defineMessages({ export default @connect() @injectIntl -class DirectTimeline extends React.PureComponent { +class DirectTimeline extends PureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/domain_blocks/index.js b/app/javascript/gabsocial/features/domain_blocks/index.js index 05d1e44a..7e703b9e 100644 --- a/app/javascript/gabsocial/features/domain_blocks/index.js +++ b/app/javascript/gabsocial/features/domain_blocks/index.js @@ -1,8 +1,5 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../components/loading_indicator'; diff --git a/app/javascript/gabsocial/features/explore/index.js b/app/javascript/gabsocial/features/explore/index.js index cf28da67..50afa043 100644 --- a/app/javascript/gabsocial/features/explore/index.js +++ b/app/javascript/gabsocial/features/explore/index.js @@ -1,4 +1,3 @@ -import React from 'react'; const Explore = () => (
diff --git a/app/javascript/gabsocial/features/favourited_statuses/index.js b/app/javascript/gabsocial/features/favourited_statuses/index.js index 439898aa..9a77b8f5 100644 --- a/app/javascript/gabsocial/features/favourited_statuses/index.js +++ b/app/javascript/gabsocial/features/favourited_statuses/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { fetchFavouritedStatuses, expandFavouritedStatuses } from '../../actions/favourites'; import Column from '../ui/components/column'; diff --git a/app/javascript/gabsocial/features/favourites/index.js b/app/javascript/gabsocial/features/favourites/index.js index 8c23ed50..0981191b 100644 --- a/app/javascript/gabsocial/features/favourites/index.js +++ b/app/javascript/gabsocial/features/favourites/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from '../../components/loading_indicator'; import { fetchFavourites } from '../../actions/interactions'; diff --git a/app/javascript/gabsocial/features/follow_requests/components/account_authorize.js b/app/javascript/gabsocial/features/follow_requests/components/account_authorize.js index 58615624..df21a5cf 100644 --- a/app/javascript/gabsocial/features/follow_requests/components/account_authorize.js +++ b/app/javascript/gabsocial/features/follow_requests/components/account_authorize.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Permalink from '../../../components/permalink'; import Avatar from '../../../components/avatar'; diff --git a/app/javascript/gabsocial/features/follow_requests/containers/account_authorize_container.js b/app/javascript/gabsocial/features/follow_requests/containers/account_authorize_container.js index 8db471f7..1fc9b92b 100644 --- a/app/javascript/gabsocial/features/follow_requests/containers/account_authorize_container.js +++ b/app/javascript/gabsocial/features/follow_requests/containers/account_authorize_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import { makeGetAccount } from '../../../selectors'; import AccountAuthorize from '../components/account_authorize'; import { authorizeFollowRequest, rejectFollowRequest } from '../../../actions/accounts'; diff --git a/app/javascript/gabsocial/features/follow_requests/index.js b/app/javascript/gabsocial/features/follow_requests/index.js index 865d5f46..ba5df4e8 100644 --- a/app/javascript/gabsocial/features/follow_requests/index.js +++ b/app/javascript/gabsocial/features/follow_requests/index.js @@ -1,8 +1,5 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../components/loading_indicator'; diff --git a/app/javascript/gabsocial/features/followers/index.js b/app/javascript/gabsocial/features/followers/index.js index 57b20ffe..b77f293f 100644 --- a/app/javascript/gabsocial/features/followers/index.js +++ b/app/javascript/gabsocial/features/followers/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../components/loading_indicator'; diff --git a/app/javascript/gabsocial/features/following/index.js b/app/javascript/gabsocial/features/following/index.js index 16681535..f1088ddc 100644 --- a/app/javascript/gabsocial/features/following/index.js +++ b/app/javascript/gabsocial/features/following/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../components/loading_indicator'; diff --git a/app/javascript/gabsocial/features/generic_not_found/index.js b/app/javascript/gabsocial/features/generic_not_found/index.js index 0290be47..a7afe29b 100644 --- a/app/javascript/gabsocial/features/generic_not_found/index.js +++ b/app/javascript/gabsocial/features/generic_not_found/index.js @@ -1,4 +1,3 @@ -import React from 'react'; import Column from '../ui/components/column'; import MissingIndicator from '../../components/missing_indicator'; diff --git a/app/javascript/gabsocial/features/getting_started/index.js b/app/javascript/gabsocial/features/getting_started/index.js index c56ba7d8..58a09b83 100644 --- a/app/javascript/gabsocial/features/getting_started/index.js +++ b/app/javascript/gabsocial/features/getting_started/index.js @@ -1,10 +1,7 @@ -import React from 'react'; import Column from '../ui/components/column'; import ColumnLink from '../ui/components/column_link'; import ColumnSubheading from '../ui/components/column_subheading'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { me, profile_directory } from '../../initial_state'; diff --git a/app/javascript/gabsocial/features/groups/create/index.js b/app/javascript/gabsocial/features/groups/create/index.js index eb8606a7..36ae25d2 100644 --- a/app/javascript/gabsocial/features/groups/create/index.js +++ b/app/javascript/gabsocial/features/groups/create/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import { changeValue, submit, reset } from '../../../actions/group_editor'; import Icon from '../../../components/icon'; import { defineMessages, injectIntl } from 'react-intl'; @@ -31,7 +28,7 @@ const mapDispatchToProps = dispatch => ({ export default @connect(mapStateToProps, mapDispatchToProps) @injectIntl -class Create extends React.PureComponent { +class Create extends PureComponent { static contextTypes = { router: PropTypes.object diff --git a/app/javascript/gabsocial/features/groups/edit/index.js b/app/javascript/gabsocial/features/groups/edit/index.js index 3334f52d..8cfd820e 100644 --- a/app/javascript/gabsocial/features/groups/edit/index.js +++ b/app/javascript/gabsocial/features/groups/edit/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { changeValue, submit, setUp } from '../../../actions/group_editor'; import Icon from '../../../components/icon'; @@ -35,7 +32,7 @@ const mapDispatchToProps = dispatch => ({ export default @connect(mapStateToProps, mapDispatchToProps) @injectIntl -class Edit extends React.PureComponent { +class Edit extends PureComponent { static contextTypes = { router: PropTypes.object diff --git a/app/javascript/gabsocial/features/groups/index/card.js b/app/javascript/gabsocial/features/groups/index/card.js index 82a52a16..4517eab8 100644 --- a/app/javascript/gabsocial/features/groups/index/card.js +++ b/app/javascript/gabsocial/features/groups/index/card.js @@ -1,10 +1,8 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { shortNumberFormat } from '../../../utils/numbers'; -import { connect } from 'react-redux'; const messages = defineMessages({ members: { id: 'groups.card.members', defaultMessage: 'Members' }, diff --git a/app/javascript/gabsocial/features/groups/index/index.js b/app/javascript/gabsocial/features/groups/index/index.js index 176e5ef5..96ed664c 100644 --- a/app/javascript/gabsocial/features/groups/index/index.js +++ b/app/javascript/gabsocial/features/groups/index/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { fetchGroups } from '../../../actions/groups'; import { defineMessages, injectIntl } from 'react-intl'; diff --git a/app/javascript/gabsocial/features/groups/members/index.js b/app/javascript/gabsocial/features/groups/members/index.js index ed396d4f..9caa8f98 100644 --- a/app/javascript/gabsocial/features/groups/members/index.js +++ b/app/javascript/gabsocial/features/groups/members/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../../components/loading_indicator'; diff --git a/app/javascript/gabsocial/features/groups/removed_accounts/index.js b/app/javascript/gabsocial/features/groups/removed_accounts/index.js index c8ad0e08..7ea6290d 100644 --- a/app/javascript/gabsocial/features/groups/removed_accounts/index.js +++ b/app/javascript/gabsocial/features/groups/removed_accounts/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../../components/loading_indicator'; diff --git a/app/javascript/gabsocial/features/groups/sidebar_panel/index.js b/app/javascript/gabsocial/features/groups/sidebar_panel/index.js index 0e351685..86c85acb 100644 --- a/app/javascript/gabsocial/features/groups/sidebar_panel/index.js +++ b/app/javascript/gabsocial/features/groups/sidebar_panel/index.js @@ -1,8 +1,6 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl } from 'react-intl'; -import { connect } from 'react-redux'; import Item from './item'; import Icon from 'gabsocial/components/icon'; import { Link } from 'react-router-dom'; diff --git a/app/javascript/gabsocial/features/groups/sidebar_panel/item.js b/app/javascript/gabsocial/features/groups/sidebar_panel/item.js index a4015c18..9ee283f4 100644 --- a/app/javascript/gabsocial/features/groups/sidebar_panel/item.js +++ b/app/javascript/gabsocial/features/groups/sidebar_panel/item.js @@ -1,10 +1,8 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { shortNumberFormat } from '../../../utils/numbers'; -import { connect } from 'react-redux'; const messages = defineMessages({ new_statuses: { id: 'groups.sidebar-panel.item.view', defaultMessage: 'new gabs' }, diff --git a/app/javascript/gabsocial/features/groups/timeline/components/header.js b/app/javascript/gabsocial/features/groups/timeline/components/header.js index 9691fca3..1b13097c 100644 --- a/app/javascript/gabsocial/features/groups/timeline/components/header.js +++ b/app/javascript/gabsocial/features/groups/timeline/components/header.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import Button from 'gabsocial/components/button'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl } from 'react-intl'; diff --git a/app/javascript/gabsocial/features/groups/timeline/components/panel.js b/app/javascript/gabsocial/features/groups/timeline/components/panel.js index 9fe1c81e..10fdea93 100644 --- a/app/javascript/gabsocial/features/groups/timeline/components/panel.js +++ b/app/javascript/gabsocial/features/groups/timeline/components/panel.js @@ -1,4 +1,3 @@ -import React from 'react'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl, defineMessages } from 'react-intl'; diff --git a/app/javascript/gabsocial/features/groups/timeline/containers/header_container.js b/app/javascript/gabsocial/features/groups/timeline/containers/header_container.js index a2c5cf11..d8013934 100644 --- a/app/javascript/gabsocial/features/groups/timeline/containers/header_container.js +++ b/app/javascript/gabsocial/features/groups/timeline/containers/header_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import Header from '../components/header'; import { joinGroup, leaveGroup } from '../../../../actions/groups'; diff --git a/app/javascript/gabsocial/features/groups/timeline/index.js b/app/javascript/gabsocial/features/groups/timeline/index.js index 0dc648fe..884ead79 100644 --- a/app/javascript/gabsocial/features/groups/timeline/index.js +++ b/app/javascript/gabsocial/features/groups/timeline/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import StatusListContainer from '../../ui/containers/status_list_container'; import Column from '../../../components/column'; @@ -22,7 +19,7 @@ const mapStateToProps = (state, props) => ({ export default @connect(mapStateToProps) @injectIntl -class GroupTimeline extends React.PureComponent { +class GroupTimeline extends PureComponent { static contextTypes = { router: PropTypes.object, }; diff --git a/app/javascript/gabsocial/features/hashtag_timeline/index.js b/app/javascript/gabsocial/features/hashtag_timeline/index.js index f2cec7e4..41e31efd 100644 --- a/app/javascript/gabsocial/features/hashtag_timeline/index.js +++ b/app/javascript/gabsocial/features/hashtag_timeline/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; @@ -15,7 +12,7 @@ const mapStateToProps = (state, props) => ({ }); export default @connect(mapStateToProps) -class HashtagTimeline extends React.PureComponent { +class HashtagTimeline extends PureComponent { disconnects = []; diff --git a/app/javascript/gabsocial/features/home_timeline/components/column_settings.js b/app/javascript/gabsocial/features/home_timeline/components/column_settings.js index efbce902..bff27fb9 100644 --- a/app/javascript/gabsocial/features/home_timeline/components/column_settings.js +++ b/app/javascript/gabsocial/features/home_timeline/components/column_settings.js @@ -1,11 +1,9 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl, FormattedMessage } from 'react-intl'; import SettingToggle from '../../notifications/components/setting_toggle'; export default @injectIntl -class ColumnSettings extends React.PureComponent { +class ColumnSettings extends PureComponent { static propTypes = { settings: ImmutablePropTypes.map.isRequired, diff --git a/app/javascript/gabsocial/features/home_timeline/containers/column_settings_container.js b/app/javascript/gabsocial/features/home_timeline/containers/column_settings_container.js index fd8a3929..260fe418 100644 --- a/app/javascript/gabsocial/features/home_timeline/containers/column_settings_container.js +++ b/app/javascript/gabsocial/features/home_timeline/containers/column_settings_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import ColumnSettings from '../components/column_settings'; import { changeSetting, saveSettings } from '../../../actions/settings'; diff --git a/app/javascript/gabsocial/features/home_timeline/index.js b/app/javascript/gabsocial/features/home_timeline/index.js index 91beee39..1c829f2b 100644 --- a/app/javascript/gabsocial/features/home_timeline/index.js +++ b/app/javascript/gabsocial/features/home_timeline/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { expandHomeTimeline } from '../../actions/timelines'; -import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; @@ -19,7 +16,7 @@ const mapStateToProps = state => ({ export default @connect(mapStateToProps) @injectIntl -class HomeTimeline extends React.PureComponent { +class HomeTimeline extends PureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/introduction/index.js b/app/javascript/gabsocial/features/introduction/index.js index a860e9ff..2a268a95 100644 --- a/app/javascript/gabsocial/features/introduction/index.js +++ b/app/javascript/gabsocial/features/introduction/index.js @@ -1,8 +1,5 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ReactSwipeableViews from 'react-swipeable-views'; import classNames from 'classnames'; -import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import { closeOnboarding } from '../../actions/onboarding'; @@ -73,7 +70,7 @@ FrameInteractions.propTypes = { }; export default @connect(state => ({ domain: state.getIn(['meta', 'domain']) })) -class Introduction extends React.PureComponent { +class Introduction extends PureComponent { static propTypes = { domain: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/features/list_adder/components/account.js b/app/javascript/gabsocial/features/list_adder/components/account.js index 1369aac0..bbe5713b 100644 --- a/app/javascript/gabsocial/features/list_adder/components/account.js +++ b/app/javascript/gabsocial/features/list_adder/components/account.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { makeGetAccount } from '../../../selectors'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/gabsocial/features/list_adder/components/list.js b/app/javascript/gabsocial/features/list_adder/components/list.js index f7993738..5b1e4a2f 100644 --- a/app/javascript/gabsocial/features/list_adder/components/list.js +++ b/app/javascript/gabsocial/features/list_adder/components/list.js @@ -1,6 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import IconButton from '../../../components/icon_button'; diff --git a/app/javascript/gabsocial/features/list_adder/index.js b/app/javascript/gabsocial/features/list_adder/index.js index 146a5e2b..83b85dba 100644 --- a/app/javascript/gabsocial/features/list_adder/index.js +++ b/app/javascript/gabsocial/features/list_adder/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { setupListAdder, resetListAdder } from '../../actions/lists'; diff --git a/app/javascript/gabsocial/features/list_editor/components/account.js b/app/javascript/gabsocial/features/list_editor/components/account.js index 48085af4..e059057e 100644 --- a/app/javascript/gabsocial/features/list_editor/components/account.js +++ b/app/javascript/gabsocial/features/list_editor/components/account.js @@ -1,6 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import { makeGetAccount } from '../../../selectors'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/gabsocial/features/list_editor/components/edit_list_form.js b/app/javascript/gabsocial/features/list_editor/components/edit_list_form.js index a429a2b7..1ed57f18 100644 --- a/app/javascript/gabsocial/features/list_editor/components/edit_list_form.js +++ b/app/javascript/gabsocial/features/list_editor/components/edit_list_form.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import { changeListEditorTitle, submitListEditor } from '../../../actions/lists'; import Button from '../../../components/button'; import { defineMessages, injectIntl } from 'react-intl'; @@ -22,7 +19,7 @@ const mapDispatchToProps = dispatch => ({ export default @connect(mapStateToProps, mapDispatchToProps) @injectIntl -class ListForm extends React.PureComponent { +class ListForm extends PureComponent { static propTypes = { value: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/features/list_editor/components/search.js b/app/javascript/gabsocial/features/list_editor/components/search.js index 9527b580..c80f6705 100644 --- a/app/javascript/gabsocial/features/list_editor/components/search.js +++ b/app/javascript/gabsocial/features/list_editor/components/search.js @@ -1,6 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl } from 'react-intl'; import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists'; import classNames from 'classnames'; @@ -24,7 +21,7 @@ const mapDispatchToProps = dispatch => ({ export default @connect(mapStateToProps, mapDispatchToProps) @injectIntl -class Search extends React.PureComponent { +class Search extends PureComponent { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/features/list_editor/index.js b/app/javascript/gabsocial/features/list_editor/index.js index 784a4e9e..edb63016 100644 --- a/app/javascript/gabsocial/features/list_editor/index.js +++ b/app/javascript/gabsocial/features/list_editor/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { injectIntl, defineMessages } from 'react-intl'; import { setupListEditor, clearListSuggestions, resetListEditor } from '../../actions/lists'; diff --git a/app/javascript/gabsocial/features/list_timeline/index.js b/app/javascript/gabsocial/features/list_timeline/index.js index f62980f3..ad65c21a 100644 --- a/app/javascript/gabsocial/features/list_timeline/index.js +++ b/app/javascript/gabsocial/features/list_timeline/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; @@ -28,7 +25,7 @@ const mapStateToProps = (state, props) => ({ export default @connect(mapStateToProps) @injectIntl -class ListTimeline extends React.PureComponent { +class ListTimeline extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/features/lists/components/new_list_form.js b/app/javascript/gabsocial/features/lists/components/new_list_form.js index 4f6ee5f4..0aa4a489 100644 --- a/app/javascript/gabsocial/features/lists/components/new_list_form.js +++ b/app/javascript/gabsocial/features/lists/components/new_list_form.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import { changeListEditorTitle, submitListEditor } from '../../../actions/lists'; import Button from '../../../components/button'; import { defineMessages, injectIntl } from 'react-intl'; @@ -23,7 +20,7 @@ const mapDispatchToProps = dispatch => ({ export default @connect(mapStateToProps, mapDispatchToProps) @injectIntl -class NewListForm extends React.PureComponent { +class NewListForm extends PureComponent { static propTypes = { value: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/features/lists/index.js b/app/javascript/gabsocial/features/lists/index.js index 66b4fca6..8ab57c62 100644 --- a/app/javascript/gabsocial/features/lists/index.js +++ b/app/javascript/gabsocial/features/lists/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from '../../components/loading_indicator'; import Column from '../ui/components/column'; diff --git a/app/javascript/gabsocial/features/mutes/index.js b/app/javascript/gabsocial/features/mutes/index.js index dc33f67f..9312fee6 100644 --- a/app/javascript/gabsocial/features/mutes/index.js +++ b/app/javascript/gabsocial/features/mutes/index.js @@ -1,8 +1,5 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import LoadingIndicator from '../../components/loading_indicator'; diff --git a/app/javascript/gabsocial/features/notifications/components/clear_column_button.js b/app/javascript/gabsocial/features/notifications/components/clear_column_button.js index c8bd772f..5f1d6370 100644 --- a/app/javascript/gabsocial/features/notifications/components/clear_column_button.js +++ b/app/javascript/gabsocial/features/notifications/components/clear_column_button.js @@ -1,9 +1,7 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import Icon from 'gabsocial/components/icon'; -export default class ClearColumnButton extends React.PureComponent { +export default class ClearColumnButton extends PureComponent { static propTypes = { onClick: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/notifications/components/column_settings.js b/app/javascript/gabsocial/features/notifications/components/column_settings.js index 464c0544..e2c3c9fc 100644 --- a/app/javascript/gabsocial/features/notifications/components/column_settings.js +++ b/app/javascript/gabsocial/features/notifications/components/column_settings.js @@ -1,11 +1,9 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import ClearColumnButton from './clear_column_button'; import SettingToggle from './setting_toggle'; -export default class ColumnSettings extends React.PureComponent { +export default class ColumnSettings extends PureComponent { static propTypes = { settings: ImmutablePropTypes.map.isRequired, diff --git a/app/javascript/gabsocial/features/notifications/components/filter_bar.js b/app/javascript/gabsocial/features/notifications/components/filter_bar.js index 7444d48e..a1a7f32b 100644 --- a/app/javascript/gabsocial/features/notifications/components/filter_bar.js +++ b/app/javascript/gabsocial/features/notifications/components/filter_bar.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Icon from 'gabsocial/components/icon'; @@ -12,7 +10,7 @@ const tooltips = defineMessages({ }); export default @injectIntl -class FilterBar extends React.PureComponent { +class FilterBar extends PureComponent { static propTypes = { selectFilter: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/notifications/components/notification.js b/app/javascript/gabsocial/features/notifications/components/notification.js index 37235840..e549c4fd 100644 --- a/app/javascript/gabsocial/features/notifications/components/notification.js +++ b/app/javascript/gabsocial/features/notifications/components/notification.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import StatusContainer from '../../../containers/status_container'; import AccountContainer from '../../../containers/account_container'; diff --git a/app/javascript/gabsocial/features/notifications/components/setting_toggle.js b/app/javascript/gabsocial/features/notifications/components/setting_toggle.js index 7aec16d2..3fd5ed5a 100644 --- a/app/javascript/gabsocial/features/notifications/components/setting_toggle.js +++ b/app/javascript/gabsocial/features/notifications/components/setting_toggle.js @@ -1,9 +1,7 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Toggle from 'react-toggle'; -export default class SettingToggle extends React.PureComponent { +export default class SettingToggle extends PureComponent { static propTypes = { prefix: PropTypes.string, diff --git a/app/javascript/gabsocial/features/notifications/containers/column_settings_container.js b/app/javascript/gabsocial/features/notifications/containers/column_settings_container.js index a67f2629..16e7822f 100644 --- a/app/javascript/gabsocial/features/notifications/containers/column_settings_container.js +++ b/app/javascript/gabsocial/features/notifications/containers/column_settings_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import { defineMessages, injectIntl } from 'react-intl'; import ColumnSettings from '../components/column_settings'; import { changeSetting } from '../../../actions/settings'; diff --git a/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js b/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js index 4d495c29..015f1abd 100644 --- a/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js +++ b/app/javascript/gabsocial/features/notifications/containers/filter_bar_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import FilterBar from '../components/filter_bar'; import { setFilter } from '../../../actions/notifications'; diff --git a/app/javascript/gabsocial/features/notifications/containers/notification_container.js b/app/javascript/gabsocial/features/notifications/containers/notification_container.js index 78576c76..9bbab687 100644 --- a/app/javascript/gabsocial/features/notifications/containers/notification_container.js +++ b/app/javascript/gabsocial/features/notifications/containers/notification_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import { makeGetNotification, makeGetStatus } from '../../../selectors'; import Notification from '../components/notification'; import { openModal } from '../../../actions/modal'; diff --git a/app/javascript/gabsocial/features/notifications/index.js b/app/javascript/gabsocial/features/notifications/index.js index 0f932627..d394300d 100644 --- a/app/javascript/gabsocial/features/notifications/index.js +++ b/app/javascript/gabsocial/features/notifications/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; @@ -50,7 +47,7 @@ const mapStateToProps = state => ({ export default @connect(mapStateToProps) @injectIntl -class Notifications extends React.PureComponent { +class Notifications extends PureComponent { static propTypes = { notifications: ImmutablePropTypes.list.isRequired, diff --git a/app/javascript/gabsocial/features/pinned_statuses/index.js b/app/javascript/gabsocial/features/pinned_statuses/index.js index 85a0e5d2..a612f806 100644 --- a/app/javascript/gabsocial/features/pinned_statuses/index.js +++ b/app/javascript/gabsocial/features/pinned_statuses/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { fetchPinnedStatuses } from '../../actions/pin_statuses'; import Column from '../ui/components/column'; diff --git a/app/javascript/gabsocial/features/reblogs/index.js b/app/javascript/gabsocial/features/reblogs/index.js index 3a1aab97..6a99fe9e 100644 --- a/app/javascript/gabsocial/features/reblogs/index.js +++ b/app/javascript/gabsocial/features/reblogs/index.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from '../../components/loading_indicator'; import MissingIndicator from '../../components/missing_indicator'; diff --git a/app/javascript/gabsocial/features/report/components/status_check_box.js b/app/javascript/gabsocial/features/report/components/status_check_box.js index c29e517d..bc870a32 100644 --- a/app/javascript/gabsocial/features/report/components/status_check_box.js +++ b/app/javascript/gabsocial/features/report/components/status_check_box.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Toggle from 'react-toggle'; import noop from 'lodash/noop'; @@ -7,7 +5,7 @@ import StatusContent from '../../../components/status_content'; import { MediaGallery, Video } from '../../ui/util/async-components'; import Bundle from '../../ui/components/bundle'; -export default class StatusCheckBox extends React.PureComponent { +export default class StatusCheckBox extends PureComponent { static propTypes = { status: ImmutablePropTypes.map.isRequired, diff --git a/app/javascript/gabsocial/features/report/containers/status_check_box_container.js b/app/javascript/gabsocial/features/report/containers/status_check_box_container.js index 48cd0319..6d423978 100644 --- a/app/javascript/gabsocial/features/report/containers/status_check_box_container.js +++ b/app/javascript/gabsocial/features/report/containers/status_check_box_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import StatusCheckBox from '../components/status_check_box'; import { toggleStatusReport } from '../../../actions/reports'; import { Set as ImmutableSet } from 'immutable'; diff --git a/app/javascript/gabsocial/features/search/components/header.js b/app/javascript/gabsocial/features/search/components/header.js index 133e298b..6437d74b 100644 --- a/app/javascript/gabsocial/features/search/components/header.js +++ b/app/javascript/gabsocial/features/search/components/header.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import { NavLink } from 'react-router-dom'; diff --git a/app/javascript/gabsocial/features/search/index.js b/app/javascript/gabsocial/features/search/index.js index d1941cec..76018ed1 100644 --- a/app/javascript/gabsocial/features/search/index.js +++ b/app/javascript/gabsocial/features/search/index.js @@ -1,4 +1,3 @@ -import React from 'react'; import SearchContainer from 'gabsocial/features/compose/containers/search_container'; import SearchResultsContainer from 'gabsocial/features/compose/containers/search_results_container'; diff --git a/app/javascript/gabsocial/features/standalone/compose/index.js b/app/javascript/gabsocial/features/standalone/compose/index.js index 0d764575..47009bcd 100644 --- a/app/javascript/gabsocial/features/standalone/compose/index.js +++ b/app/javascript/gabsocial/features/standalone/compose/index.js @@ -1,10 +1,9 @@ -import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; import ModalContainer from '../../ui/containers/modal_container'; -export default class Compose extends React.PureComponent { +export default class Compose extends PureComponent { render () { return ( diff --git a/app/javascript/gabsocial/features/standalone/hashtag_timeline/index.js b/app/javascript/gabsocial/features/standalone/hashtag_timeline/index.js index 0868965a..e8d4261b 100644 --- a/app/javascript/gabsocial/features/standalone/hashtag_timeline/index.js +++ b/app/javascript/gabsocial/features/standalone/hashtag_timeline/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { expandHashtagTimeline } from 'gabsocial/actions/timelines'; import Masonry from 'react-masonry-infinite'; @@ -16,7 +13,7 @@ const mapStateToProps = (state, { hashtag }) => ({ }); export default @connect(mapStateToProps) -class HashtagTimeline extends React.PureComponent { +class HashtagTimeline extends PureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/standalone/public_timeline/index.js b/app/javascript/gabsocial/features/standalone/public_timeline/index.js index e1565e99..2d982001 100644 --- a/app/javascript/gabsocial/features/standalone/public_timeline/index.js +++ b/app/javascript/gabsocial/features/standalone/public_timeline/index.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { expandPublicTimeline, expandCommunityTimeline } from 'gabsocial/actions/timelines'; import Masonry from 'react-masonry-infinite'; @@ -20,7 +17,7 @@ const mapStateToProps = (state, { local }) => { }; export default @connect(mapStateToProps) -class PublicTimeline extends React.PureComponent { +class PublicTimeline extends PureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/status/components/action_bar.js b/app/javascript/gabsocial/features/status/components/action_bar.js index 5f047892..61a7db2e 100644 --- a/app/javascript/gabsocial/features/status/components/action_bar.js +++ b/app/javascript/gabsocial/features/status/components/action_bar.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { openModal } from '../../../actions/modal'; -import PropTypes from 'prop-types'; import IconButton from '../../../components/icon_button'; import ImmutablePropTypes from 'react-immutable-proptypes'; import DropdownMenuContainer from '../../../containers/dropdown_menu_container'; @@ -39,7 +36,7 @@ const mapDispatchToProps = (dispatch) => ({ }, }); -class ActionBar extends React.PureComponent { +class ActionBar extends PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/features/status/components/card.js b/app/javascript/gabsocial/features/status/components/card.js index b050e928..9ea38a26 100644 --- a/app/javascript/gabsocial/features/status/components/card.js +++ b/app/javascript/gabsocial/features/status/components/card.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Immutable from 'immutable'; import ImmutablePropTypes from 'react-immutable-proptypes'; import punycode from 'punycode'; @@ -54,7 +52,7 @@ const addAutoPlay = html => { return html; }; -export default class Card extends React.PureComponent { +export default class Card extends PureComponent { static propTypes = { card: ImmutablePropTypes.map, diff --git a/app/javascript/gabsocial/features/status/components/detailed_status.js b/app/javascript/gabsocial/features/status/components/detailed_status.js index 9fac7ef0..9bb7961c 100644 --- a/app/javascript/gabsocial/features/status/components/detailed_status.js +++ b/app/javascript/gabsocial/features/status/components/detailed_status.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; diff --git a/app/javascript/gabsocial/features/status/containers/detailed_status_container.js b/app/javascript/gabsocial/features/status/containers/detailed_status_container.js index de5fbeb7..f0d634d5 100644 --- a/app/javascript/gabsocial/features/status/containers/detailed_status_container.js +++ b/app/javascript/gabsocial/features/status/containers/detailed_status_container.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import DetailedStatus from '../components/detailed_status'; import { makeGetStatus } from '../../../selectors'; import { diff --git a/app/javascript/gabsocial/features/status/index.js b/app/javascript/gabsocial/features/status/index.js index 20420ee1..03ed19a5 100644 --- a/app/javascript/gabsocial/features/status/index.js +++ b/app/javascript/gabsocial/features/status/index.js @@ -1,7 +1,4 @@ import Immutable from 'immutable'; -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { fetchStatus } from '../../actions/statuses'; diff --git a/app/javascript/gabsocial/features/ui/components/__tests__/column-test.js b/app/javascript/gabsocial/features/ui/components/__tests__/column-test.js index 11cc1b6e..a56975a6 100644 --- a/app/javascript/gabsocial/features/ui/components/__tests__/column-test.js +++ b/app/javascript/gabsocial/features/ui/components/__tests__/column-test.js @@ -1,4 +1,3 @@ -import React from 'react'; import { mount } from 'enzyme'; import Column from '../column'; import ColumnHeader from '../column_header'; diff --git a/app/javascript/gabsocial/features/ui/components/actions_modal.js b/app/javascript/gabsocial/features/ui/components/actions_modal.js index 1cb360f8..bbd2bd9d 100644 --- a/app/javascript/gabsocial/features/ui/components/actions_modal.js +++ b/app/javascript/gabsocial/features/ui/components/actions_modal.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import StatusContent from '../../../components/status_content'; diff --git a/app/javascript/gabsocial/features/ui/components/boost_modal.js b/app/javascript/gabsocial/features/ui/components/boost_modal.js index 1a6f9a7b..9ec4d247 100644 --- a/app/javascript/gabsocial/features/ui/components/boost_modal.js +++ b/app/javascript/gabsocial/features/ui/components/boost_modal.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Button from '../../../components/button'; import StatusContent from '../../../components/status_content'; diff --git a/app/javascript/gabsocial/features/ui/components/bundle.js b/app/javascript/gabsocial/features/ui/components/bundle.js index a60ace35..f84ce103 100644 --- a/app/javascript/gabsocial/features/ui/components/bundle.js +++ b/app/javascript/gabsocial/features/ui/components/bundle.js @@ -1,10 +1,8 @@ -import React from 'react'; -import PropTypes from 'prop-types'; const emptyComponent = () => null; const noop = () => { }; -class Bundle extends React.PureComponent { +class Bundle extends PureComponent { static propTypes = { fetchComponent: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/ui/components/bundle_column_error.js b/app/javascript/gabsocial/features/ui/components/bundle_column_error.js index a886cdcc..c94d3f60 100644 --- a/app/javascript/gabsocial/features/ui/components/bundle_column_error.js +++ b/app/javascript/gabsocial/features/ui/components/bundle_column_error.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import Column from './column'; @@ -12,7 +10,7 @@ const messages = defineMessages({ retry: { id: 'bundle_column_error.retry', defaultMessage: 'Try again' }, }); -class BundleColumnError extends React.PureComponent { +class BundleColumnError extends PureComponent { static propTypes = { onRetry: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/ui/components/bundle_modal_error.js b/app/javascript/gabsocial/features/ui/components/bundle_modal_error.js index f9365b95..bb72318b 100644 --- a/app/javascript/gabsocial/features/ui/components/bundle_modal_error.js +++ b/app/javascript/gabsocial/features/ui/components/bundle_modal_error.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import IconButton from '../../../components/icon_button'; @@ -10,7 +8,7 @@ const messages = defineMessages({ close: { id: 'bundle_modal_error.close', defaultMessage: 'Close' }, }); -class BundleModalError extends React.PureComponent { +class BundleModalError extends PureComponent { static propTypes = { onRetry: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/features/ui/components/column.js b/app/javascript/gabsocial/features/ui/components/column.js index 4c7b837e..e63ec5fa 100644 --- a/app/javascript/gabsocial/features/ui/components/column.js +++ b/app/javascript/gabsocial/features/ui/components/column.js @@ -1,11 +1,9 @@ -import React from 'react'; import ColumnHeader from './column_header'; -import PropTypes from 'prop-types'; import { isMobile } from '../../../utils/is_mobile'; import ColumnBackButton from '../../../components/column_back_button'; import ColumnBackButtonSlim from '../../../components/column_back_button_slim'; -export default class Column extends React.PureComponent { +export default class Column extends PureComponent { static propTypes = { heading: PropTypes.string, diff --git a/app/javascript/gabsocial/features/ui/components/column_header.js b/app/javascript/gabsocial/features/ui/components/column_header.js index abea7b9d..d669fa6a 100644 --- a/app/javascript/gabsocial/features/ui/components/column_header.js +++ b/app/javascript/gabsocial/features/ui/components/column_header.js @@ -1,9 +1,7 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import Icon from 'gabsocial/components/icon'; -export default class ColumnHeader extends React.PureComponent { +export default class ColumnHeader extends PureComponent { static propTypes = { icon: PropTypes.string, diff --git a/app/javascript/gabsocial/features/ui/components/column_link.js b/app/javascript/gabsocial/features/ui/components/column_link.js index e384c3fd..7d972781 100644 --- a/app/javascript/gabsocial/features/ui/components/column_link.js +++ b/app/javascript/gabsocial/features/ui/components/column_link.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import Icon from 'gabsocial/components/icon'; diff --git a/app/javascript/gabsocial/features/ui/components/column_loading.js b/app/javascript/gabsocial/features/ui/components/column_loading.js index bc7d5494..928fca67 100644 --- a/app/javascript/gabsocial/features/ui/components/column_loading.js +++ b/app/javascript/gabsocial/features/ui/components/column_loading.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Column from '../../../components/column'; import ColumnHeader from '../../../components/column_header'; diff --git a/app/javascript/gabsocial/features/ui/components/column_subheading.js b/app/javascript/gabsocial/features/ui/components/column_subheading.js index 8160c4aa..3f60b90d 100644 --- a/app/javascript/gabsocial/features/ui/components/column_subheading.js +++ b/app/javascript/gabsocial/features/ui/components/column_subheading.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; const ColumnSubheading = ({ text }) => { return ( diff --git a/app/javascript/gabsocial/features/ui/components/columns_area.js b/app/javascript/gabsocial/features/ui/components/columns_area.js index 34981a6a..23eaf9ec 100644 --- a/app/javascript/gabsocial/features/ui/components/columns_area.js +++ b/app/javascript/gabsocial/features/ui/components/columns_area.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { injectIntl } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/features/ui/components/compose_modal.js b/app/javascript/gabsocial/features/ui/components/compose_modal.js index 865bdec3..262650e9 100644 --- a/app/javascript/gabsocial/features/ui/components/compose_modal.js +++ b/app/javascript/gabsocial/features/ui/components/compose_modal.js @@ -1,7 +1,4 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { connect } from 'react-redux'; import { me } from '../../../initial_state'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Avatar from '../../../components/avatar'; diff --git a/app/javascript/gabsocial/features/ui/components/confirmation_modal.js b/app/javascript/gabsocial/features/ui/components/confirmation_modal.js index ef5428db..9001b121 100644 --- a/app/javascript/gabsocial/features/ui/components/confirmation_modal.js +++ b/app/javascript/gabsocial/features/ui/components/confirmation_modal.js @@ -1,10 +1,8 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { injectIntl, FormattedMessage } from 'react-intl'; import Button from '../../../components/button'; export default @injectIntl -class ConfirmationModal extends React.PureComponent { +class ConfirmationModal extends PureComponent { static propTypes = { message: PropTypes.node.isRequired, diff --git a/app/javascript/gabsocial/features/ui/components/drawer_loading.js b/app/javascript/gabsocial/features/ui/components/drawer_loading.js index 08b0d234..0013dcc2 100644 --- a/app/javascript/gabsocial/features/ui/components/drawer_loading.js +++ b/app/javascript/gabsocial/features/ui/components/drawer_loading.js @@ -1,4 +1,3 @@ -import React from 'react'; const DrawerLoading = () => (
diff --git a/app/javascript/gabsocial/features/ui/components/embed_modal.js b/app/javascript/gabsocial/features/ui/components/embed_modal.js index 982781db..93e73c64 100644 --- a/app/javascript/gabsocial/features/ui/components/embed_modal.js +++ b/app/javascript/gabsocial/features/ui/components/embed_modal.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage, injectIntl } from 'react-intl'; import api from '../../../api'; diff --git a/app/javascript/gabsocial/features/ui/components/focal_point_modal.js b/app/javascript/gabsocial/features/ui/components/focal_point_modal.js index 7488a359..8621ee85 100644 --- a/app/javascript/gabsocial/features/ui/components/focal_point_modal.js +++ b/app/javascript/gabsocial/features/ui/components/focal_point_modal.js @@ -1,7 +1,5 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { connect } from 'react-redux'; import ImageLoader from './image_loader'; import classNames from 'classnames'; import { changeUploadCompose } from '../../../actions/compose'; diff --git a/app/javascript/gabsocial/features/ui/components/hotkeys_modal.js b/app/javascript/gabsocial/features/ui/components/hotkeys_modal.js index d1ed6dfd..fdc05177 100644 --- a/app/javascript/gabsocial/features/ui/components/hotkeys_modal.js +++ b/app/javascript/gabsocial/features/ui/components/hotkeys_modal.js @@ -1,6 +1,4 @@ -import React from 'react'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import IconButton from 'gabsocial/components/icon_button'; diff --git a/app/javascript/gabsocial/features/ui/components/image_loader.js b/app/javascript/gabsocial/features/ui/components/image_loader.js index 5e1cf75a..4b20efd2 100644 --- a/app/javascript/gabsocial/features/ui/components/image_loader.js +++ b/app/javascript/gabsocial/features/ui/components/image_loader.js @@ -1,10 +1,8 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import { LoadingBar } from 'react-redux-loading-bar'; import ZoomableImage from './zoomable_image'; -export default class ImageLoader extends React.PureComponent { +export default class ImageLoader extends PureComponent { static propTypes = { alt: PropTypes.string, diff --git a/app/javascript/gabsocial/features/ui/components/link_footer.js b/app/javascript/gabsocial/features/ui/components/link_footer.js index a51b2a84..46a82568 100644 --- a/app/javascript/gabsocial/features/ui/components/link_footer.js +++ b/app/javascript/gabsocial/features/ui/components/link_footer.js @@ -1,9 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { FormattedMessage, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { invitesEnabled, version, repository, source_url, me } from 'gabsocial/initial_state'; -import { connect } from 'react-redux'; import { openModal } from '../../../actions/modal'; const mapStateToProps = state => ({ diff --git a/app/javascript/gabsocial/features/ui/components/list_panel.js b/app/javascript/gabsocial/features/ui/components/list_panel.js index d1a79009..b7d60f42 100644 --- a/app/javascript/gabsocial/features/ui/components/list_panel.js +++ b/app/javascript/gabsocial/features/ui/components/list_panel.js @@ -1,9 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { fetchLists } from 'gabsocial/actions/lists'; -import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { NavLink, withRouter } from 'react-router-dom'; import Icon from 'gabsocial/components/icon'; diff --git a/app/javascript/gabsocial/features/ui/components/media_modal.js b/app/javascript/gabsocial/features/ui/components/media_modal.js index 8a5da4a9..a70d0668 100644 --- a/app/javascript/gabsocial/features/ui/components/media_modal.js +++ b/app/javascript/gabsocial/features/ui/components/media_modal.js @@ -1,7 +1,5 @@ -import React from 'react'; import ReactSwipeableViews from 'react-swipeable-views'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import Video from 'gabsocial/features/video'; import ExtendedVideoPlayer from 'gabsocial/components/extended_video_player'; import classNames from 'classnames'; diff --git a/app/javascript/gabsocial/features/ui/components/modal_loading.js b/app/javascript/gabsocial/features/ui/components/modal_loading.js index f403ca4c..7a6bbf5f 100644 --- a/app/javascript/gabsocial/features/ui/components/modal_loading.js +++ b/app/javascript/gabsocial/features/ui/components/modal_loading.js @@ -1,5 +1,3 @@ -import React from 'react'; - import LoadingIndicator from '../../../components/loading_indicator'; // Keep the markup in sync with diff --git a/app/javascript/gabsocial/features/ui/components/modal_root.js b/app/javascript/gabsocial/features/ui/components/modal_root.js index c365f75f..8a000df7 100644 --- a/app/javascript/gabsocial/features/ui/components/modal_root.js +++ b/app/javascript/gabsocial/features/ui/components/modal_root.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Base from '../../../components/modal_root'; import BundleContainer from '../containers/bundle_container'; import BundleModalError from './bundle_modal_error'; @@ -39,7 +37,7 @@ const MODAL_COMPONENTS = { 'UNAUTHORIZED': () => Promise.resolve({ default: UnauthorizedModal }), }; -export default class ModalRoot extends React.PureComponent { +export default class ModalRoot extends PureComponent { static propTypes = { type: PropTypes.string, diff --git a/app/javascript/gabsocial/features/ui/components/mute_modal.js b/app/javascript/gabsocial/features/ui/components/mute_modal.js index ac356b42..d62924bc 100644 --- a/app/javascript/gabsocial/features/ui/components/mute_modal.js +++ b/app/javascript/gabsocial/features/ui/components/mute_modal.js @@ -1,6 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import PropTypes from 'prop-types'; import { injectIntl, FormattedMessage } from 'react-intl'; import Toggle from 'react-toggle'; import Button from '../../../components/button'; @@ -35,7 +32,7 @@ const mapDispatchToProps = dispatch => { export default @connect(mapStateToProps, mapDispatchToProps) @injectIntl -class MuteModal extends React.PureComponent { +class MuteModal extends PureComponent { static propTypes = { isSubmitting: PropTypes.bool.isRequired, diff --git a/app/javascript/gabsocial/features/ui/components/notifications_counter_icon.js b/app/javascript/gabsocial/features/ui/components/notifications_counter_icon.js index af4e0e8f..990c75fc 100644 --- a/app/javascript/gabsocial/features/ui/components/notifications_counter_icon.js +++ b/app/javascript/gabsocial/features/ui/components/notifications_counter_icon.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import IconWithBadge from 'gabsocial/components/icon_with_badge'; const mapStateToProps = state => ({ diff --git a/app/javascript/gabsocial/features/ui/components/profile_info_panel.js b/app/javascript/gabsocial/features/ui/components/profile_info_panel.js index e63d3427..a4c83667 100644 --- a/app/javascript/gabsocial/features/ui/components/profile_info_panel.js +++ b/app/javascript/gabsocial/features/ui/components/profile_info_panel.js @@ -1,9 +1,6 @@ 'use strict'; -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Button from 'gabsocial/components/button'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/features/ui/components/promo_panel.js b/app/javascript/gabsocial/features/ui/components/promo_panel.js index ebf1f768..bfc09d87 100644 --- a/app/javascript/gabsocial/features/ui/components/promo_panel.js +++ b/app/javascript/gabsocial/features/ui/components/promo_panel.js @@ -1,6 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { injectIntl, FormattedMessage } from 'react-intl'; import { me } from '../../../initial_state'; diff --git a/app/javascript/gabsocial/features/ui/components/report_modal.js b/app/javascript/gabsocial/features/ui/components/report_modal.js index 2e41f784..46ba2eee 100644 --- a/app/javascript/gabsocial/features/ui/components/report_modal.js +++ b/app/javascript/gabsocial/features/ui/components/report_modal.js @@ -1,8 +1,5 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { changeReportComment, changeReportForward, submitReport } from '../../../actions/reports'; import { expandAccountTimeline } from '../../../actions/timelines'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { makeGetAccount } from '../../../selectors'; import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; diff --git a/app/javascript/gabsocial/features/ui/components/sign_up_panel.js b/app/javascript/gabsocial/features/ui/components/sign_up_panel.js index 74b98e0d..5f0532ee 100644 --- a/app/javascript/gabsocial/features/ui/components/sign_up_panel.js +++ b/app/javascript/gabsocial/features/ui/components/sign_up_panel.js @@ -1,4 +1,3 @@ -import React from 'react'; import { FormattedMessage } from 'react-intl'; import { NavLink } from 'react-router-dom'; import { me } from 'gabsocial/initial_state'; diff --git a/app/javascript/gabsocial/features/ui/components/tabs_bar.js b/app/javascript/gabsocial/features/ui/components/tabs_bar.js index 1188032c..3a0d7be5 100644 --- a/app/javascript/gabsocial/features/ui/components/tabs_bar.js +++ b/app/javascript/gabsocial/features/ui/components/tabs_bar.js @@ -1,9 +1,6 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { NavLink, withRouter } from 'react-router-dom'; import { FormattedMessage, injectIntl } from 'react-intl'; import { debounce } from 'lodash'; -import { connect } from 'react-redux'; import { isUserTouching } from '../../../utils/is_mobile'; import { me } from '../../../initial_state'; import { Link } from 'react-router-dom'; diff --git a/app/javascript/gabsocial/features/ui/components/trends_panel.js b/app/javascript/gabsocial/features/ui/components/trends_panel.js index 382043d9..470851c0 100644 --- a/app/javascript/gabsocial/features/ui/components/trends_panel.js +++ b/app/javascript/gabsocial/features/ui/components/trends_panel.js @@ -1,8 +1,5 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { NavLink, withRouter } from 'react-router-dom'; import { FormattedMessage, injectIntl } from 'react-intl'; -import { connect } from 'react-redux'; import { fetchTrends } from '../../../actions/trends'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/gabsocial/features/ui/components/unauthorized_modal.js b/app/javascript/gabsocial/features/ui/components/unauthorized_modal.js index adedd595..b791cf36 100644 --- a/app/javascript/gabsocial/features/ui/components/unauthorized_modal.js +++ b/app/javascript/gabsocial/features/ui/components/unauthorized_modal.js @@ -1,7 +1,4 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { connect } from 'react-redux'; import { me } from '../../../initial_state'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Avatar from '../../../components/avatar'; diff --git a/app/javascript/gabsocial/features/ui/components/upload_area.js b/app/javascript/gabsocial/features/ui/components/upload_area.js index 6c423b2c..bfacc1c3 100644 --- a/app/javascript/gabsocial/features/ui/components/upload_area.js +++ b/app/javascript/gabsocial/features/ui/components/upload_area.js @@ -1,10 +1,8 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import { FormattedMessage } from 'react-intl'; -export default class UploadArea extends React.PureComponent { +export default class UploadArea extends PureComponent { static propTypes = { active: PropTypes.bool, diff --git a/app/javascript/gabsocial/features/ui/components/user_panel.js b/app/javascript/gabsocial/features/ui/components/user_panel.js index c1579b3d..e7dbea30 100644 --- a/app/javascript/gabsocial/features/ui/components/user_panel.js +++ b/app/javascript/gabsocial/features/ui/components/user_panel.js @@ -1,6 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { injectIntl, FormattedMessage } from 'react-intl'; import { autoPlayGif, me } from '../../../initial_state'; diff --git a/app/javascript/gabsocial/features/ui/components/video_modal.js b/app/javascript/gabsocial/features/ui/components/video_modal.js index 211634cc..19adc37a 100644 --- a/app/javascript/gabsocial/features/ui/components/video_modal.js +++ b/app/javascript/gabsocial/features/ui/components/video_modal.js @@ -1,6 +1,4 @@ -import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import Video from 'gabsocial/features/video'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; diff --git a/app/javascript/gabsocial/features/ui/components/who_to_follow_panel.js b/app/javascript/gabsocial/features/ui/components/who_to_follow_panel.js index fdbce31d..134d640e 100644 --- a/app/javascript/gabsocial/features/ui/components/who_to_follow_panel.js +++ b/app/javascript/gabsocial/features/ui/components/who_to_follow_panel.js @@ -1,8 +1,5 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { NavLink, withRouter } from 'react-router-dom'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; -import { connect } from 'react-redux'; import { fetchSuggestions, dismissSuggestion } from '../../../actions/suggestions'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; diff --git a/app/javascript/gabsocial/features/ui/components/zoomable_image.js b/app/javascript/gabsocial/features/ui/components/zoomable_image.js index 3f6562bc..d58b470e 100644 --- a/app/javascript/gabsocial/features/ui/components/zoomable_image.js +++ b/app/javascript/gabsocial/features/ui/components/zoomable_image.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; const MIN_SCALE = 1; const MAX_SCALE = 4; @@ -14,7 +12,7 @@ const getDistance = (p1, p2) => const clamp = (min, max, value) => Math.min(max, Math.max(min, value)); -export default class ZoomableImage extends React.PureComponent { +export default class ZoomableImage extends PureComponent { static propTypes = { alt: PropTypes.string, diff --git a/app/javascript/gabsocial/features/ui/containers/bundle_container.js b/app/javascript/gabsocial/features/ui/containers/bundle_container.js index 7e3f0c3a..7adb596e 100644 --- a/app/javascript/gabsocial/features/ui/containers/bundle_container.js +++ b/app/javascript/gabsocial/features/ui/containers/bundle_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import Bundle from '../components/bundle'; diff --git a/app/javascript/gabsocial/features/ui/containers/columns_area_container.js b/app/javascript/gabsocial/features/ui/containers/columns_area_container.js index 4e26f301..a6a0e6c7 100644 --- a/app/javascript/gabsocial/features/ui/containers/columns_area_container.js +++ b/app/javascript/gabsocial/features/ui/containers/columns_area_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import ColumnsArea from '../components/columns_area'; const mapStateToProps = state => ({ diff --git a/app/javascript/gabsocial/features/ui/containers/modal_container.js b/app/javascript/gabsocial/features/ui/containers/modal_container.js index 51c06e9b..353c1362 100644 --- a/app/javascript/gabsocial/features/ui/containers/modal_container.js +++ b/app/javascript/gabsocial/features/ui/containers/modal_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import { closeModal } from '../../../actions/modal'; import { cancelReplyCompose } from '../../../actions/compose'; import ModalRoot from '../components/modal_root'; diff --git a/app/javascript/gabsocial/features/ui/containers/notifications_container.js b/app/javascript/gabsocial/features/ui/containers/notifications_container.js index b60a0216..bded99bb 100644 --- a/app/javascript/gabsocial/features/ui/containers/notifications_container.js +++ b/app/javascript/gabsocial/features/ui/containers/notifications_container.js @@ -1,5 +1,4 @@ import { injectIntl } from 'react-intl'; -import { connect } from 'react-redux'; import { NotificationStack } from 'react-notification'; import { dismissAlert } from '../../../actions/alerts'; import { getAlerts } from '../../../selectors'; diff --git a/app/javascript/gabsocial/features/ui/containers/status_list_container.js b/app/javascript/gabsocial/features/ui/containers/status_list_container.js index f130f9f4..c91f434b 100644 --- a/app/javascript/gabsocial/features/ui/containers/status_list_container.js +++ b/app/javascript/gabsocial/features/ui/containers/status_list_container.js @@ -1,4 +1,3 @@ -import { connect } from 'react-redux'; import StatusList from '../../../components/status_list'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; import { createSelector } from 'reselect'; diff --git a/app/javascript/gabsocial/features/ui/index.js b/app/javascript/gabsocial/features/ui/index.js index 1a834651..d15b6cbe 100644 --- a/app/javascript/gabsocial/features/ui/index.js +++ b/app/javascript/gabsocial/features/ui/index.js @@ -1,12 +1,9 @@ 'use strict'; import classNames from 'classnames'; -import React from 'react'; import { HotKeys } from 'react-hotkeys'; import { defineMessages, injectIntl } from 'react-intl'; -import { connect } from 'react-redux'; import { Switch, Redirect, withRouter } from 'react-router-dom'; -import PropTypes from 'prop-types'; import NotificationsContainer from './containers/notifications_container'; import LoadingBarContainer from './containers/loading_bar_container'; import ModalContainer from './containers/modal_container'; @@ -141,7 +138,7 @@ const LAYOUT = { const shouldHideFAB = path => path.match(/^\/posts\/|^\/search|^\/getting-started/); -class SwitchingColumnsArea extends React.PureComponent { +class SwitchingColumnsArea extends PureComponent { static propTypes = { children: PropTypes.node, @@ -246,7 +243,7 @@ class SwitchingColumnsArea extends React.PureComponent { export default @connect(mapStateToProps) @injectIntl @withRouter -class UI extends React.PureComponent { +class UI extends PureComponent { static contextTypes = { router: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/features/ui/util/react_router_helpers.js b/app/javascript/gabsocial/features/ui/util/react_router_helpers.js index 042c182c..266501cb 100644 --- a/app/javascript/gabsocial/features/ui/util/react_router_helpers.js +++ b/app/javascript/gabsocial/features/ui/util/react_router_helpers.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { Redirect, Route } from 'react-router-dom'; import ColumnsAreaContainer from '../containers/columns_area_container'; import ColumnLoading from '../components/column_loading'; @@ -7,7 +5,7 @@ import BundleColumnError from '../components/bundle_column_error'; import BundleContainer from '../containers/bundle_container'; import { me } from 'gabsocial/initial_state'; -export class WrappedRoute extends React.Component { +export class WrappedRoute extends Component { static propTypes = { component: PropTypes.func.isRequired, page: PropTypes.func, diff --git a/app/javascript/gabsocial/features/ui/util/reduced_motion.js b/app/javascript/gabsocial/features/ui/util/reduced_motion.js index 95519042..e95a6b3d 100644 --- a/app/javascript/gabsocial/features/ui/util/reduced_motion.js +++ b/app/javascript/gabsocial/features/ui/util/reduced_motion.js @@ -1,8 +1,6 @@ // Like react-motion's Motion, but reduces all animations to cross-fades // for the benefit of users with motion sickness. -import React from 'react'; import Motion from 'react-motion/lib/Motion'; -import PropTypes from 'prop-types'; const stylesToKeep = ['opacity', 'backgroundOpacity']; @@ -11,7 +9,7 @@ const extractValue = (value) => { return (typeof value === 'object' && value && 'val' in value) ? value.val : value; }; -class ReducedMotion extends React.Component { +class ReducedMotion extends Component { static propTypes = { defaultStyle: PropTypes.object, diff --git a/app/javascript/gabsocial/features/video/index.js b/app/javascript/gabsocial/features/video/index.js index ffebd3b6..fd779f46 100644 --- a/app/javascript/gabsocial/features/video/index.js +++ b/app/javascript/gabsocial/features/video/index.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { fromJS, is } from 'immutable'; import { throttle } from 'lodash'; @@ -87,7 +85,7 @@ export const getPointerPosition = (el, event) => { }; export default @injectIntl -class Video extends React.PureComponent { +class Video extends PureComponent { static propTypes = { preview: PropTypes.string, diff --git a/app/javascript/gabsocial/main.js b/app/javascript/gabsocial/main.js index d5f4a8bc..8bc4df72 100644 --- a/app/javascript/gabsocial/main.js +++ b/app/javascript/gabsocial/main.js @@ -2,7 +2,6 @@ import * as registerPushNotifications from './actions/push_notifications'; import { default as GabSocial, store } from './containers/gabsocial'; -import React from 'react'; import ReactDOM from 'react-dom'; import ready from './ready'; diff --git a/app/javascript/gabsocial/pages/group_page.js b/app/javascript/gabsocial/pages/group_page.js index a2ff5e8a..a2b79b69 100644 --- a/app/javascript/gabsocial/pages/group_page.js +++ b/app/javascript/gabsocial/pages/group_page.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { PropTypes } from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/pages/groups_page.js b/app/javascript/gabsocial/pages/groups_page.js index 2cbaa481..78e918d9 100644 --- a/app/javascript/gabsocial/pages/groups_page.js +++ b/app/javascript/gabsocial/pages/groups_page.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { me } from 'gabsocial/initial_state'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/pages/home_page.js b/app/javascript/gabsocial/pages/home_page.js index 43f034c8..03c4631b 100644 --- a/app/javascript/gabsocial/pages/home_page.js +++ b/app/javascript/gabsocial/pages/home_page.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import { me } from 'gabsocial/initial_state'; -import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import WhoToFollowPanel from '../features/ui/components/who_to_follow_panel'; import LinkFooter from '../features/ui/components/link_footer'; diff --git a/app/javascript/gabsocial/pages/profile_page.js b/app/javascript/gabsocial/pages/profile_page.js index 11ba187f..bc6656b7 100644 --- a/app/javascript/gabsocial/pages/profile_page.js +++ b/app/javascript/gabsocial/pages/profile_page.js @@ -1,7 +1,4 @@ -import React from 'react'; -import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import PropTypes from 'prop-types'; import { fetchAccount, fetchAccountByUsername } from '../actions/accounts'; import { List as ImmutableList } from 'immutable'; import ImmutablePureComponent from 'react-immutable-pure-component'; diff --git a/app/javascript/gabsocial/pages/search_page.js b/app/javascript/gabsocial/pages/search_page.js index 57c1482f..9a1ab4ad 100644 --- a/app/javascript/gabsocial/pages/search_page.js +++ b/app/javascript/gabsocial/pages/search_page.js @@ -1,5 +1,3 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import Header from '../features/search/components/header'; import WhoToFollowPanel from '../features/ui/components/who_to_follow_panel'; // import TrendsPanel from '../features/ui/components/trends_panel'; diff --git a/config/webpack/shared.js b/config/webpack/shared.js index cb4e5a85..2fac41c3 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -66,6 +66,13 @@ module.exports = { }, plugins: [ + new webpack.ProvidePlugin({ + React: 'react', + Component: ['react', 'Component'], + PureComponent: ['react', 'PureComponent'], + connect: ['react-redux', 'connect'], + PropTypes: 'prop-types', + }), new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))), new webpack.NormalModuleReplacementPlugin( /^history\//, (resource) => {