diff --git a/app/javascript/gabsocial/components/about_sidebar.js b/app/javascript/gabsocial/components/about_sidebar.js index 6bafbee0..158f637d 100644 --- a/app/javascript/gabsocial/components/about_sidebar.js +++ b/app/javascript/gabsocial/components/about_sidebar.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { injectIntl, defineMessages } from 'react-intl' diff --git a/app/javascript/gabsocial/components/account.js b/app/javascript/gabsocial/components/account.js index e26597ec..30256b9f 100644 --- a/app/javascript/gabsocial/components/account.js +++ b/app/javascript/gabsocial/components/account.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import { NavLink } from 'react-router-dom' import ImmutablePropTypes from 'react-immutable-proptypes' import { defineMessages, injectIntl } from 'react-intl' @@ -123,10 +123,10 @@ class Account extends ImmutablePureComponent { if (isHidden) { return ( - + {account.get('display_name')} {`@${account.get('username')}`} - + ) } diff --git a/app/javascript/gabsocial/components/account_action_button.js b/app/javascript/gabsocial/components/account_action_button.js index aec0191f..2c3bf1ae 100644 --- a/app/javascript/gabsocial/components/account_action_button.js +++ b/app/javascript/gabsocial/components/account_action_button.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { injectIntl, defineMessages } from 'react-intl' diff --git a/app/javascript/gabsocial/components/account_authorize.js b/app/javascript/gabsocial/components/account_authorize.js index 6888722d..70a5578e 100644 --- a/app/javascript/gabsocial/components/account_authorize.js +++ b/app/javascript/gabsocial/components/account_authorize.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, injectIntl } from 'react-intl' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' diff --git a/app/javascript/gabsocial/components/autosuggest_account.js b/app/javascript/gabsocial/components/autosuggest_account.js index 6d124f1b..ce570bfe 100644 --- a/app/javascript/gabsocial/components/autosuggest_account.js +++ b/app/javascript/gabsocial/components/autosuggest_account.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { makeGetAccount } from '../selectors' diff --git a/app/javascript/gabsocial/components/autosuggest_emoji.js b/app/javascript/gabsocial/components/autosuggest_emoji.js index 38b60101..3f3fb5aa 100644 --- a/app/javascript/gabsocial/components/autosuggest_emoji.js +++ b/app/javascript/gabsocial/components/autosuggest_emoji.js @@ -1,9 +1,10 @@ +import React from 'react' import unicodeMapping from './emoji/emoji_unicode_mapping_light' import Text from './text' const assetHost = process.env.CDN_HOST || '' -export default class AutosuggestEmoji extends PureComponent { +export default class AutosuggestEmoji extends React.PureComponent { static propTypes = { emoji: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/autosuggest_textbox.js b/app/javascript/gabsocial/components/autosuggest_textbox.js index 6a32159e..a61da099 100644 --- a/app/javascript/gabsocial/components/autosuggest_textbox.js +++ b/app/javascript/gabsocial/components/autosuggest_textbox.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import isObject from 'lodash.isobject' import ImmutablePureComponent from 'react-immutable-pure-component' @@ -249,7 +249,7 @@ export default class AutosuggestTextbox extends ImmutablePureComponent { }) return ( - +
} -
+ ) } diff --git a/app/javascript/gabsocial/components/avatar.js b/app/javascript/gabsocial/components/avatar.js index e92c6e09..45dbb633 100644 --- a/app/javascript/gabsocial/components/avatar.js +++ b/app/javascript/gabsocial/components/avatar.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import debounce from 'lodash.debounce' diff --git a/app/javascript/gabsocial/components/back_button.js b/app/javascript/gabsocial/components/back_button.js index a8265aa9..8b56622e 100644 --- a/app/javascript/gabsocial/components/back_button.js +++ b/app/javascript/gabsocial/components/back_button.js @@ -1,7 +1,8 @@ +import React from 'react' import { CX } from '../constants' import Button from './button' -export default class BackButton extends PureComponent { +export default class BackButton extends React.PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/block.js b/app/javascript/gabsocial/components/block.js index b95f2891..80d7e063 100644 --- a/app/javascript/gabsocial/components/block.js +++ b/app/javascript/gabsocial/components/block.js @@ -1,7 +1,9 @@ +import React from 'react' + /** * Renders a block component */ -export default class Block extends PureComponent { +export default class Block extends React.PureComponent { static propTypes = { children: PropTypes.any, diff --git a/app/javascript/gabsocial/components/block_heading.js b/app/javascript/gabsocial/components/block_heading.js index 468ee27b..4d6eef13 100644 --- a/app/javascript/gabsocial/components/block_heading.js +++ b/app/javascript/gabsocial/components/block_heading.js @@ -1,6 +1,7 @@ +import React from 'react' import Heading from './heading' -export default class BlockHeading extends PureComponent { +export default class BlockHeading extends React.PureComponent { static propTypes = { title: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/components/bundle_column_error.js b/app/javascript/gabsocial/components/bundle_column_error.js index 597b7602..cf0c129b 100644 --- a/app/javascript/gabsocial/components/bundle_column_error.js +++ b/app/javascript/gabsocial/components/bundle_column_error.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, FormattedMessage, injectIntl } from 'react-intl' import { source_url, @@ -20,7 +21,7 @@ const messages = defineMessages({ export default @injectIntl -class BundleColumnError extends PureComponent { +class BundleColumnError extends React.PureComponent { static propTypes = { onRetry: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/components/button.js b/app/javascript/gabsocial/components/button.js index 5edf7f57..e9f590c7 100644 --- a/app/javascript/gabsocial/components/button.js +++ b/app/javascript/gabsocial/components/button.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import { NavLink } from 'react-router-dom' import classNames from 'classnames/bind' import Icon from './icon' @@ -45,7 +45,7 @@ const COLORS = { * @param {bool} [props.type] - `type` attribute for button * @param {bool} [props.underlineOnHover] - if the button has underline on hover */ -export default class Button extends PureComponent { +export default class Button extends React.PureComponent { static propTypes = { backgroundColor: PropTypes.string, @@ -204,10 +204,10 @@ export default class Button extends PureComponent { ) : undefined const theChildren = !!icon ? ( - + {theIcon} {children} - + ) : children const handlers = { diff --git a/app/javascript/gabsocial/components/character_counter.js b/app/javascript/gabsocial/components/character_counter.js index 08042a2b..44326cef 100644 --- a/app/javascript/gabsocial/components/character_counter.js +++ b/app/javascript/gabsocial/components/character_counter.js @@ -1,3 +1,4 @@ +import React from 'react' import { length } from 'stringz' /** @@ -5,7 +6,7 @@ import { length } from 'stringz' * @param {string} props.text - text to use to measure * @param {number} props.max - max text allowed */ -export default class CharacterCounter extends PureComponent { +export default class CharacterCounter extends React.PureComponent { static propTypes = { text: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/components/column_indicator.js b/app/javascript/gabsocial/components/column_indicator.js index 904fae9b..b02e3ad0 100644 --- a/app/javascript/gabsocial/components/column_indicator.js +++ b/app/javascript/gabsocial/components/column_indicator.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, injectIntl } from 'react-intl' import Icon from './icon' import Text from './text' @@ -9,7 +10,7 @@ const messages = defineMessages({ export default @injectIntl -class ColumnIndicator extends PureComponent { +class ColumnIndicator extends React.PureComponent { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/comment.js b/app/javascript/gabsocial/components/comment.js index a1efcb42..48c0d209 100644 --- a/app/javascript/gabsocial/components/comment.js +++ b/app/javascript/gabsocial/components/comment.js @@ -1,3 +1,4 @@ +import React from 'react' import { NavLink } from 'react-router-dom' import { defineMessages, injectIntl, FormattedMessage } from 'react-intl' import ImmutablePropTypes from 'react-immutable-proptypes' @@ -247,7 +248,7 @@ class Comment extends ImmutablePureComponent { } -class CommentButton extends PureComponent { +class CommentButton extends React.PureComponent { static propTypes = { onClick: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/components/comment_header.js b/app/javascript/gabsocial/components/comment_header.js index 2b39958f..0788db00 100644 --- a/app/javascript/gabsocial/components/comment_header.js +++ b/app/javascript/gabsocial/components/comment_header.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import { NavLink } from 'react-router-dom' import { defineMessages, injectIntl } from 'react-intl' import ImmutablePropTypes from 'react-immutable-proptypes' @@ -87,7 +87,7 @@ class CommentHeader extends ImmutablePureComponent { { !!status.get('group') && - + - + } { status.get('revised_at') !== null && - + - + } { favoriteCount > 0 && - + - + } { repostCount > 0 && - + - + } diff --git a/app/javascript/gabsocial/components/comment_list.js b/app/javascript/gabsocial/components/comment_list.js index 6ebcf1cb..ca540fef 100644 --- a/app/javascript/gabsocial/components/comment_list.js +++ b/app/javascript/gabsocial/components/comment_list.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import Button from './button' @@ -31,7 +31,7 @@ export default class CommentList extends ImmutablePureComponent { const Wrapper = !commentsLimited ? ScrollableList : Dummy return ( - + { descendants.slice(0, max).map((descendant, i) => ( @@ -67,7 +67,7 @@ export default class CommentList extends ImmutablePureComponent { } - + ) } diff --git a/app/javascript/gabsocial/components/composer.js b/app/javascript/gabsocial/components/composer.js index f6a7411b..55125711 100644 --- a/app/javascript/gabsocial/components/composer.js +++ b/app/javascript/gabsocial/components/composer.js @@ -1,3 +1,4 @@ +import React from 'react' import { getDefaultKeyBinding, Editor, @@ -110,7 +111,7 @@ const GROUP_HANDLE_REGEX = /\g\/[\w]+/g const HANDLE_REGEX = /\@[\w]+/g const HASHTAG_REGEX = /\#[\w\u0590-\u05ff]+/g -export default class Composer extends PureComponent { +export default class Composer extends React.PureComponent { static propTypes = { inputRef: PropTypes.func, diff --git a/app/javascript/gabsocial/components/display_name.js b/app/javascript/gabsocial/components/display_name.js index d30744fb..5ded6ad1 100644 --- a/app/javascript/gabsocial/components/display_name.js +++ b/app/javascript/gabsocial/components/display_name.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import debounce from 'lodash.debounce' diff --git a/app/javascript/gabsocial/components/divider.js b/app/javascript/gabsocial/components/divider.js index c50a998d..dc3a248b 100644 --- a/app/javascript/gabsocial/components/divider.js +++ b/app/javascript/gabsocial/components/divider.js @@ -1,3 +1,4 @@ +import React from 'react' import { CX } from '../constants' /** @@ -5,7 +6,7 @@ import { CX } from '../constants' * @param {bool} [props.isInvisible] - to style the tab bar larger * @param {bool} [props.isSmall] - if item is active */ -export default class Divider extends PureComponent { +export default class Divider extends React.PureComponent { static propTypes = { isInvisible: PropTypes.bool, diff --git a/app/javascript/gabsocial/components/dot_text_seperator.js b/app/javascript/gabsocial/components/dot_text_seperator.js index f3a587d8..494e6b08 100644 --- a/app/javascript/gabsocial/components/dot_text_seperator.js +++ b/app/javascript/gabsocial/components/dot_text_seperator.js @@ -1,6 +1,7 @@ +import React from 'react' import Text from './text' -export default class DotTextSeperator extends PureComponent { +export default class DotTextSeperator extends React.PureComponent { render() { return ( diff --git a/app/javascript/gabsocial/components/dummy.js b/app/javascript/gabsocial/components/dummy.js index b7a25d75..a9c8708b 100644 --- a/app/javascript/gabsocial/components/dummy.js +++ b/app/javascript/gabsocial/components/dummy.js @@ -1,4 +1,6 @@ -export default class Dummy extends PureComponent { +import React from 'react' + +export default class Dummy extends React.PureComponent { render() { return ( diff --git a/app/javascript/gabsocial/components/error_boundary.js b/app/javascript/gabsocial/components/error_boundary.js index 89205692..c9694b83 100644 --- a/app/javascript/gabsocial/components/error_boundary.js +++ b/app/javascript/gabsocial/components/error_boundary.js @@ -1,3 +1,4 @@ +import React from 'react' import { FormattedMessage } from 'react-intl' import { source_url, @@ -13,7 +14,7 @@ import Divider from './divider' import Icon from './icon' import Text from './text' -export default class ErrorBoundary extends PureComponent { +export default class ErrorBoundary extends React.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 70c27491..eb8f14b8 100644 --- a/app/javascript/gabsocial/components/extended_video_player.js +++ b/app/javascript/gabsocial/components/extended_video_player.js @@ -1,4 +1,6 @@ -export default class ExtendedVideoPlayer extends PureComponent { +import React from 'react' + +export default class ExtendedVideoPlayer extends React.PureComponent { static propTypes = { src: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/components/file_input.js b/app/javascript/gabsocial/components/file_input.js index 8d255659..03ebe43f 100644 --- a/app/javascript/gabsocial/components/file_input.js +++ b/app/javascript/gabsocial/components/file_input.js @@ -1,9 +1,10 @@ +import React from 'react' import { CX } from '../constants' import Icon from './icon' import Image from './image' import Text from './text' -export default class FileInput extends PureComponent { +export default class FileInput extends React.PureComponent { static propTypes = { onChange: PropTypes.func, diff --git a/app/javascript/gabsocial/components/floating_action_button.js b/app/javascript/gabsocial/components/floating_action_button.js index d80e723b..e8c09dc0 100644 --- a/app/javascript/gabsocial/components/floating_action_button.js +++ b/app/javascript/gabsocial/components/floating_action_button.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, injectIntl } from 'react-intl' import { me } from '../initial_state' import { CX } from '../constants' @@ -15,7 +16,7 @@ const mapDispatchToProps = (dispatch) => ({ export default @injectIntl @connect(null, mapDispatchToProps) -class FloatingActionButton extends PureComponent { +class FloatingActionButton extends React.PureComponent { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/footer_bar.js b/app/javascript/gabsocial/components/footer_bar.js index cbe7ae9e..de401e10 100644 --- a/app/javascript/gabsocial/components/footer_bar.js +++ b/app/javascript/gabsocial/components/footer_bar.js @@ -1,3 +1,4 @@ +import React from 'react' import { withRouter } from 'react-router-dom' import { me } from '../initial_state' import { CX } from '../constants' @@ -11,7 +12,7 @@ const mapStateToProps = (state) => ({ export default @withRouter @connect(mapStateToProps) -class FooterBar extends PureComponent { +class FooterBar extends React.PureComponent { static contextTypes = { router: PropTypes.object, diff --git a/app/javascript/gabsocial/components/form.js b/app/javascript/gabsocial/components/form.js index 9df03b40..9a0bbf23 100644 --- a/app/javascript/gabsocial/components/form.js +++ b/app/javascript/gabsocial/components/form.js @@ -1,6 +1,7 @@ +import React from 'react' import Text from './text' -export default class Form extends PureComponent { +export default class Form extends React.PureComponent { static propTypes = { children: PropTypes.any, diff --git a/app/javascript/gabsocial/components/global_footer.js b/app/javascript/gabsocial/components/global_footer.js index 6f49a7ee..8bfd2f24 100644 --- a/app/javascript/gabsocial/components/global_footer.js +++ b/app/javascript/gabsocial/components/global_footer.js @@ -1,10 +1,11 @@ +import React from 'react' import Button from './button' import Heading from './heading' import Icon from './icon' import Text from './text' import ResponsiveClassesComponent from '../features/ui/util/responsive_classes_component' -export default class GlobalFooter extends PureComponent { +export default class GlobalFooter extends React.PureComponent { render() { @@ -158,7 +159,7 @@ export default class GlobalFooter extends PureComponent { } -class GlobalFooterColumn extends PureComponent { +class GlobalFooterColumn extends React.PureComponent { static propTypes = { title: PropTypes.string, diff --git a/app/javascript/gabsocial/components/group_collection_item.js b/app/javascript/gabsocial/components/group_collection_item.js index 6c902455..e1ce821b 100644 --- a/app/javascript/gabsocial/components/group_collection_item.js +++ b/app/javascript/gabsocial/components/group_collection_item.js @@ -1,6 +1,6 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' -import { Fragment } from 'react' import { NavLink } from 'react-router-dom' import { defineMessages, injectIntl } from 'react-intl' import classNames from 'classnames/bind' @@ -52,11 +52,11 @@ class GroupCollectionItem extends ImmutablePureComponent { if (isHidden) { return ( - + {group.get('title')} {isMember && intl.formatMessage(messages.member)} {isAdmin && intl.formatMessage(messages.admin)} - + ) } diff --git a/app/javascript/gabsocial/components/group_header.js b/app/javascript/gabsocial/components/group_header.js index 3134d3c4..44339b12 100644 --- a/app/javascript/gabsocial/components/group_header.js +++ b/app/javascript/gabsocial/components/group_header.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { defineMessages, injectIntl } from 'react-intl' diff --git a/app/javascript/gabsocial/components/group_list_item.js b/app/javascript/gabsocial/components/group_list_item.js index 3481a44b..bc20cba9 100644 --- a/app/javascript/gabsocial/components/group_list_item.js +++ b/app/javascript/gabsocial/components/group_list_item.js @@ -1,6 +1,6 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' -import { Fragment } from 'react' import { NavLink } from 'react-router-dom' import { defineMessages, injectIntl } from 'react-intl' import { joinGroup, leaveGroup } from '../actions/groups' @@ -83,9 +83,9 @@ class GroupListItem extends ImmutablePureComponent { if (isHidden) { return ( - + {group.get('title')} - + ) } diff --git a/app/javascript/gabsocial/components/group_sort_block.js b/app/javascript/gabsocial/components/group_sort_block.js index b0e29a77..452d952f 100644 --- a/app/javascript/gabsocial/components/group_sort_block.js +++ b/app/javascript/gabsocial/components/group_sort_block.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, injectIntl } from 'react-intl' import { openPopover } from '../actions/popover' import { @@ -53,7 +54,7 @@ const mapDispatchToProps = (dispatch) => ({ export default @injectIntl @connect(mapStateToProps, mapDispatchToProps) -class GroupSortBlock extends PureComponent { +class GroupSortBlock extends React.PureComponent { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/hashtag_item.js b/app/javascript/gabsocial/components/hashtag_item.js index c51225c2..da91e3fb 100644 --- a/app/javascript/gabsocial/components/hashtag_item.js +++ b/app/javascript/gabsocial/components/hashtag_item.js @@ -1,3 +1,4 @@ +import React from 'react' import { FormattedMessage } from 'react-intl' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' diff --git a/app/javascript/gabsocial/components/heading.js b/app/javascript/gabsocial/components/heading.js index 2c3b2610..20115342 100644 --- a/app/javascript/gabsocial/components/heading.js +++ b/app/javascript/gabsocial/components/heading.js @@ -1,3 +1,4 @@ +import React from 'react' import classNames from 'classnames/bind' // Bind CSS Modules global variable `_s` to classNames module @@ -27,7 +28,7 @@ const ARIA_LEVELS = { * @param {bool} [props.isCentered] - if text is centered within the element * @param {string} [props.size='h1'] - the size of the heading */ -export default class Heading extends PureComponent { +export default class Heading extends React.PureComponent { static propTypes = { children: PropTypes.any, diff --git a/app/javascript/gabsocial/components/icon.js b/app/javascript/gabsocial/components/icon.js index a7362fa8..03072ea5 100644 --- a/app/javascript/gabsocial/components/icon.js +++ b/app/javascript/gabsocial/components/icon.js @@ -1,6 +1,7 @@ +import React from 'react' import { CX } from '../constants' -export default class Icon extends PureComponent { +export default class Icon extends React.PureComponent { static propTypes = { className: PropTypes.string, diff --git a/app/javascript/gabsocial/components/image.js b/app/javascript/gabsocial/components/image.js index da4962d3..9c9e8674 100644 --- a/app/javascript/gabsocial/components/image.js +++ b/app/javascript/gabsocial/components/image.js @@ -1,8 +1,9 @@ +import React from 'react' import classNames from 'classnames/bind' const cx = classNames.bind(_s) -export default class Image extends PureComponent { +export default class Image extends React.PureComponent { static propTypes = { alt: PropTypes.string.isRequired, diff --git a/app/javascript/gabsocial/components/image_loader.js b/app/javascript/gabsocial/components/image_loader.js index 49e9cc02..233675bd 100644 --- a/app/javascript/gabsocial/components/image_loader.js +++ b/app/javascript/gabsocial/components/image_loader.js @@ -1,8 +1,9 @@ +import React from 'react' import { LoadingBar } from 'react-redux-loading-bar' import { CX } from '../constants' import ZoomableImage from './zoomable_image' -export default class ImageLoader extends PureComponent { +export default class ImageLoader extends React.PureComponent { static propTypes = { alt: PropTypes.string, diff --git a/app/javascript/gabsocial/components/input.js b/app/javascript/gabsocial/components/input.js index 01661ef3..05e081e3 100644 --- a/app/javascript/gabsocial/components/input.js +++ b/app/javascript/gabsocial/components/input.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import classNames from 'classnames/bind' import Button from './button' import Icon from './icon' @@ -6,7 +6,7 @@ import Text from './text' const cx = classNames.bind(_s) -export default class Input extends PureComponent { +export default class Input extends React.PureComponent { static propTypes = { placeholder: PropTypes.string, @@ -80,7 +80,7 @@ export default class Input extends PureComponent { }) return ( - + { !!title && !hideLabel &&
@@ -128,7 +128,7 @@ export default class Input extends PureComponent { /> }
-
+ ) } } \ No newline at end of file diff --git a/app/javascript/gabsocial/components/intersection_observer_article.js b/app/javascript/gabsocial/components/intersection_observer_article.js index 0f124d5d..2d0a85dc 100644 --- a/app/javascript/gabsocial/components/intersection_observer_article.js +++ b/app/javascript/gabsocial/components/intersection_observer_article.js @@ -1,3 +1,4 @@ +import React from 'react' import { is } from 'immutable' import { setHeight } from '../actions/height_cache' import scheduleIdleTask from '../utils/schedule_idle_task' diff --git a/app/javascript/gabsocial/components/link_footer.js b/app/javascript/gabsocial/components/link_footer.js index efb0dc4a..b85fe0d9 100644 --- a/app/javascript/gabsocial/components/link_footer.js +++ b/app/javascript/gabsocial/components/link_footer.js @@ -1,3 +1,4 @@ +import React from 'react' import { FormattedMessage, defineMessages, @@ -36,7 +37,7 @@ const mapDispatchToProps = (dispatch) => ({ export default @connect(null, mapDispatchToProps) @injectIntl -class LinkFooter extends PureComponent { +class LinkFooter extends React.PureComponent { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/list.js b/app/javascript/gabsocial/components/list.js index c12be045..00fc0c9f 100644 --- a/app/javascript/gabsocial/components/list.js +++ b/app/javascript/gabsocial/components/list.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' import Block from './block' diff --git a/app/javascript/gabsocial/components/list_item.js b/app/javascript/gabsocial/components/list_item.js index 61706828..034cfe15 100644 --- a/app/javascript/gabsocial/components/list_item.js +++ b/app/javascript/gabsocial/components/list_item.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import classNames from 'classnames/bind' import Button from './button' import Icon from './icon' @@ -7,7 +7,7 @@ import Text from './text' const cx = classNames.bind(_s) -export default class ListItem extends PureComponent { +export default class ListItem extends React.PureComponent { static propTypes = { icon: PropTypes.string, @@ -59,9 +59,9 @@ export default class ListItem extends PureComponent { if (isHidden) { return ( - + {title} - + ) } diff --git a/app/javascript/gabsocial/components/load_more.js b/app/javascript/gabsocial/components/load_more.js index d29f18f8..28a74533 100644 --- a/app/javascript/gabsocial/components/load_more.js +++ b/app/javascript/gabsocial/components/load_more.js @@ -1,3 +1,4 @@ +import React from 'react' import { injectIntl, defineMessages } from 'react-intl' import Button from './button' import Text from './text' @@ -8,7 +9,7 @@ const messages = defineMessages({ export default @injectIntl -class LoadMore extends PureComponent { +class LoadMore extends React.PureComponent { static propTypes = { onClick: PropTypes.func, diff --git a/app/javascript/gabsocial/components/loading_bar.js b/app/javascript/gabsocial/components/loading_bar.js index 39d54802..93bc43b3 100644 --- a/app/javascript/gabsocial/components/loading_bar.js +++ b/app/javascript/gabsocial/components/loading_bar.js @@ -1,3 +1,4 @@ +import React from 'react' import LoadingBar from 'react-redux-loading-bar' const mapStateToProps = (state, ownProps) => ({ diff --git a/app/javascript/gabsocial/components/logged_out_navigation_bar.js b/app/javascript/gabsocial/components/logged_out_navigation_bar.js index b1e577d3..4be567f0 100644 --- a/app/javascript/gabsocial/components/logged_out_navigation_bar.js +++ b/app/javascript/gabsocial/components/logged_out_navigation_bar.js @@ -1,3 +1,4 @@ +import React from 'react' import { BREAKPOINT_EXTRA_SMALL } from '../constants' import Button from './button' import NavigationBarButton from './navigation_bar_button' @@ -6,7 +7,7 @@ import Text from './text' import ResponsiveComponent from '../features/ui/util/responsive_component' import ResponsiveClassesComponent from '../features/ui/util/responsive_classes_component' -export default class LoggedOutNavigationBar extends PureComponent { +export default class LoggedOutNavigationBar extends React.PureComponent { static propTypes = { isProfile: PropTypes.bool, diff --git a/app/javascript/gabsocial/components/logged_out_sidebar.js b/app/javascript/gabsocial/components/logged_out_sidebar.js index 52f14a09..4e563267 100644 --- a/app/javascript/gabsocial/components/logged_out_sidebar.js +++ b/app/javascript/gabsocial/components/logged_out_sidebar.js @@ -1,3 +1,4 @@ +import React from 'react' import { injectIntl, defineMessages } from 'react-intl' import { me } from '../initial_state' import SidebarSectionTitle from './sidebar_section_title' @@ -12,7 +13,7 @@ const messages = defineMessages({ export default @injectIntl -class Sidebar extends PureComponent { +class Sidebar extends React.PureComponent { static propTypes = { intl: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/media_gallery.js b/app/javascript/gabsocial/components/media_gallery.js index cbd4602d..1c48ee52 100644 --- a/app/javascript/gabsocial/components/media_gallery.js +++ b/app/javascript/gabsocial/components/media_gallery.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { is } from 'immutable'; @@ -238,7 +239,7 @@ class Item extends ImmutablePureComponent { export default @injectIntl -class MediaGallery extends PureComponent { +class MediaGallery extends React.PureComponent { static propTypes = { sensitive: PropTypes.bool, diff --git a/app/javascript/gabsocial/components/media_item.js b/app/javascript/gabsocial/components/media_item.js index c741c296..4bfb1f66 100644 --- a/app/javascript/gabsocial/components/media_item.js +++ b/app/javascript/gabsocial/components/media_item.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { NavLink } from 'react-router-dom' diff --git a/app/javascript/gabsocial/components/modal/block_account_modal.js b/app/javascript/gabsocial/components/modal/block_account_modal.js index 52d7b43d..269bcc7c 100644 --- a/app/javascript/gabsocial/components/modal/block_account_modal.js +++ b/app/javascript/gabsocial/components/modal/block_account_modal.js @@ -1,3 +1,4 @@ +import React from 'react' import { injectIntl, defineMessages } from 'react-intl' import { makeGetAccount } from '../../selectors' import { blockAccount } from '../../actions/accounts' @@ -26,7 +27,7 @@ const mapDispatchToProps = (dispatch) => ({ export default @connect(mapStateToProps, mapDispatchToProps) @injectIntl -class BlockAccountModal extends PureComponent { +class BlockAccountModal extends React.PureComponent { static propTypes = { account: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/components/modal/boost_modal.js b/app/javascript/gabsocial/components/modal/boost_modal.js index 4527c651..0de33b5b 100644 --- a/app/javascript/gabsocial/components/modal/boost_modal.js +++ b/app/javascript/gabsocial/components/modal/boost_modal.js @@ -1,3 +1,4 @@ +import React from 'react' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { defineMessages, injectIntl } from 'react-intl' diff --git a/app/javascript/gabsocial/components/modal/bundle_error_modal.js b/app/javascript/gabsocial/components/modal/bundle_error_modal.js index c006cb8b..f1d5b7ea 100644 --- a/app/javascript/gabsocial/components/modal/bundle_error_modal.js +++ b/app/javascript/gabsocial/components/modal/bundle_error_modal.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, injectIntl } from 'react-intl' import ConfirmationModal from './confirmation_modal' @@ -9,7 +10,7 @@ const messages = defineMessages({ export default @injectIntl -class BundleErrorModal extends PureComponent { +class BundleErrorModal extends React.PureComponent { static propTypes = { onRetry: PropTypes.func.isRequired, diff --git a/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js b/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js index 05b654d0..4220d8e0 100644 --- a/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js +++ b/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, injectIntl } from 'react-intl' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' diff --git a/app/javascript/gabsocial/components/modal/compose_modal.js b/app/javascript/gabsocial/components/modal/compose_modal.js index 54c297c2..3ad685c7 100644 --- a/app/javascript/gabsocial/components/modal/compose_modal.js +++ b/app/javascript/gabsocial/components/modal/compose_modal.js @@ -1,3 +1,4 @@ +import React from 'react' import { defineMessages, injectIntl, FormattedMessage } from 'react-intl' import ImmutablePureComponent from 'react-immutable-pure-component' import { openModal } from '../../actions/modal' diff --git a/app/javascript/gabsocial/components/modal/confirmation_modal.js b/app/javascript/gabsocial/components/modal/confirmation_modal.js index 22557956..1f693fd1 100644 --- a/app/javascript/gabsocial/components/modal/confirmation_modal.js +++ b/app/javascript/gabsocial/components/modal/confirmation_modal.js @@ -1,3 +1,4 @@ +import React from 'react' import { injectIntl, FormattedMessage } from 'react-intl' import Block from '../block' import Button from '../button' @@ -6,7 +7,7 @@ import Text from '../text' export default @injectIntl -class ConfirmationModal extends PureComponent { +class ConfirmationModal extends React.PureComponent { static propTypes = { title: PropTypes.any.isRequired, diff --git a/app/javascript/gabsocial/components/modal/display_options_modal.js b/app/javascript/gabsocial/components/modal/display_options_modal.js index e44f9d8e..8ff8e5e6 100644 --- a/app/javascript/gabsocial/components/modal/display_options_modal.js +++ b/app/javascript/gabsocial/components/modal/display_options_modal.js @@ -1,3 +1,4 @@ +import React from 'react' import { injectIntl, defineMessages } from 'react-intl' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' @@ -198,7 +199,7 @@ class DisplayOptionsModal extends ImmutablePureComponent { } -class ThemeBlock extends PureComponent { +class ThemeBlock extends React.PureComponent { static propTypes = { checked: PropTypes.bool, diff --git a/app/javascript/gabsocial/components/modal/edit_profile_modal.js b/app/javascript/gabsocial/components/modal/edit_profile_modal.js index bf036acf..fe6b6801 100644 --- a/app/javascript/gabsocial/components/modal/edit_profile_modal.js +++ b/app/javascript/gabsocial/components/modal/edit_profile_modal.js @@ -1,4 +1,4 @@ -import { Fragment } from 'react' +import React from 'react' import { defineMessages, injectIntl } from 'react-intl' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' @@ -183,7 +183,7 @@ class EditProfileModal extends ImmutablePureComponent {
{ !isVerified && - + - + }