From 43e384554c5495df81d1d412f49c155a2751183d Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 17 Aug 2020 15:07:16 -0500 Subject: [PATCH] Remove React, PureComponent global import, added those imports to files directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Remove: - React, PureComponent global import and added those imports to files directly --- .../gabsocial/components/about_sidebar.js | 1 + app/javascript/gabsocial/components/account.js | 6 +++--- .../components/account_action_button.js | 1 + .../gabsocial/components/account_authorize.js | 1 + .../components/autosuggest_account.js | 1 + .../gabsocial/components/autosuggest_emoji.js | 3 ++- .../components/autosuggest_textbox.js | 6 +++--- app/javascript/gabsocial/components/avatar.js | 1 + .../gabsocial/components/back_button.js | 3 ++- app/javascript/gabsocial/components/block.js | 4 +++- .../gabsocial/components/block_heading.js | 3 ++- .../components/bundle_column_error.js | 3 ++- app/javascript/gabsocial/components/button.js | 8 ++++---- .../gabsocial/components/character_counter.js | 3 ++- .../gabsocial/components/column_indicator.js | 3 ++- app/javascript/gabsocial/components/comment.js | 3 ++- .../gabsocial/components/comment_header.js | 18 +++++++++--------- .../gabsocial/components/comment_list.js | 6 +++--- .../gabsocial/components/composer.js | 3 ++- .../gabsocial/components/display_name.js | 1 + app/javascript/gabsocial/components/divider.js | 3 ++- .../gabsocial/components/dot_text_seperator.js | 3 ++- app/javascript/gabsocial/components/dummy.js | 4 +++- .../gabsocial/components/error_boundary.js | 3 ++- .../components/extended_video_player.js | 4 +++- .../gabsocial/components/file_input.js | 3 ++- .../components/floating_action_button.js | 3 ++- .../gabsocial/components/footer_bar.js | 3 ++- app/javascript/gabsocial/components/form.js | 3 ++- .../gabsocial/components/global_footer.js | 5 +++-- .../components/group_collection_item.js | 6 +++--- .../gabsocial/components/group_header.js | 1 + .../gabsocial/components/group_list_item.js | 6 +++--- .../gabsocial/components/group_sort_block.js | 3 ++- .../gabsocial/components/hashtag_item.js | 1 + app/javascript/gabsocial/components/heading.js | 3 ++- app/javascript/gabsocial/components/icon.js | 3 ++- app/javascript/gabsocial/components/image.js | 3 ++- .../gabsocial/components/image_loader.js | 3 ++- app/javascript/gabsocial/components/input.js | 8 ++++---- .../intersection_observer_article.js | 1 + .../gabsocial/components/link_footer.js | 3 ++- app/javascript/gabsocial/components/list.js | 1 + .../gabsocial/components/list_item.js | 8 ++++---- .../gabsocial/components/load_more.js | 3 ++- .../gabsocial/components/loading_bar.js | 1 + .../components/logged_out_navigation_bar.js | 3 ++- .../gabsocial/components/logged_out_sidebar.js | 3 ++- .../gabsocial/components/media_gallery.js | 3 ++- .../gabsocial/components/media_item.js | 1 + .../components/modal/block_account_modal.js | 3 ++- .../gabsocial/components/modal/boost_modal.js | 1 + .../components/modal/bundle_error_modal.js | 3 ++- .../modal/community_timeline_settings_modal.js | 1 + .../components/modal/compose_modal.js | 1 + .../components/modal/confirmation_modal.js | 3 ++- .../components/modal/display_options_modal.js | 3 ++- .../components/modal/edit_profile_modal.js | 6 +++--- .../components/modal/edit_shortcuts_modal.js | 1 + .../gabsocial/components/modal/embed_modal.js | 1 + .../components/modal/feature_modal.js | 1 + .../components/modal/gif_picker_modal.js | 9 +++++---- .../components/modal/group_create_modal.js | 3 ++- .../components/modal/group_delete_modal.js | 3 ++- .../modal/group_timeline_settings_modal.js | 1 + .../modal/hashtag_timeline_settings_modal.js | 1 + .../modal/home_timeline_settings_modal.js | 1 + .../components/modal/hotkeys_modal.js | 3 ++- .../components/modal/list_add_user_modal.js | 1 + .../components/modal/list_create_modal.js | 1 + .../components/modal/list_delete_modal.js | 1 + .../components/modal/list_editor_modal.js | 1 + .../modal/list_timeline_settings_modal.js | 1 + .../components/modal/loading_modal.js | 3 ++- .../gabsocial/components/modal/media_modal.js | 1 + .../gabsocial/components/modal/modal_base.js | 8 ++++---- .../gabsocial/components/modal/modal_layout.js | 3 ++- .../gabsocial/components/modal/modal_root.js | 3 ++- .../gabsocial/components/modal/mute_modal.js | 3 ++- .../components/modal/pro_upgrade_modal.js | 1 + .../gabsocial/components/modal/report_modal.js | 1 + .../components/modal/status_likes_modal.js | 1 + .../components/modal/status_reposts_modal.js | 1 + .../components/modal/status_revisions_modal.js | 1 + .../components/modal/unauthorized_modal.js | 1 + .../components/modal/unfollow_modal.js | 1 + .../gabsocial/components/modal/video_modal.js | 1 + .../gabsocial/components/moved_note.js | 1 + .../gabsocial/components/navigation_bar.js | 3 ++- .../components/navigation_bar_button.js | 3 ++- .../gabsocial/components/notification.js | 10 +++++----- .../gabsocial/components/pagination.js | 3 ++- .../components/panel/group_info_panel.js | 16 ++++++++-------- .../gabsocial/components/panel/groups_panel.js | 1 + .../components/panel/list_details_panel.js | 1 + .../gabsocial/components/panel/lists_panel.js | 1 + .../components/panel/media_gallery_panel.js | 1 + .../panel/notification_filter_panel.js | 1 + .../gabsocial/components/panel/panel_layout.js | 3 ++- .../gabsocial/components/panel/pro_panel.js | 3 ++- .../components/panel/profile_info_panel.js | 14 +++++++------- .../components/panel/profile_stats_panel.js | 1 + .../components/panel/progress_panel.js | 3 ++- .../components/panel/search_filter_panel.js | 1 + .../gabsocial/components/panel/shop_panel.js | 3 ++- .../components/panel/sign_up_log_in_panel.js | 3 ++- .../components/panel/sign_up_panel.js | 3 ++- .../components/panel/status_promotion_panel.js | 1 + .../gabsocial/components/panel/trends_panel.js | 1 + .../gabsocial/components/panel/user_panel.js | 1 + .../panel/verified_accounts_panel.js | 1 + .../components/panel/who_to_follow_panel.js | 1 + .../gabsocial/components/pill_item.js | 3 ++- app/javascript/gabsocial/components/pills.js | 3 ++- .../placeholder/account_placeholder.js | 3 ++- .../placeholder/comment_placeholder.js | 3 ++- .../placeholder/group_list_item_placeholder.js | 3 ++- .../placeholder/list_item_placeholder.js | 3 ++- .../media_gallery_panel_placeholder.js | 3 ++- .../placeholder/media_gallery_placeholder.js | 3 ++- .../placeholder/notification_placeholder.js | 8 ++++---- .../placeholder/placeholder_layout.js | 3 ++- .../profile_header_xs_placeholder.js | 3 ++- .../profile_info_panel_placeholder.js | 3 ++- .../profile_stats_panel_placeholder.js | 3 ++- .../placeholder/status_placeholder.js | 8 ++++---- .../placeholder/trends_item_placeholder.js | 3 ++- app/javascript/gabsocial/components/poll.js | 6 +++--- .../popover/comment_sorting_options_popover.js | 3 ++- .../components/popover/date_picker_popover.js | 3 ++- .../components/popover/emoji_picker_popover.js | 1 + .../components/popover/error_popover.js | 3 ++- .../popover/group_list_sort_options_popover.js | 3 ++- .../popover/group_member_options_popover.js | 3 ++- .../popover/group_options_popover.js | 1 + .../group_timeline_sort_options_popover.js | 3 ++- .../group_timeline_sort_top_options_popover.js | 3 ++- .../components/popover/loading_popover.js | 3 ++- .../components/popover/nav_settings_popover.js | 3 ++- .../components/popover/popover_base.js | 1 + .../components/popover/popover_layout.js | 3 ++- .../components/popover/popover_root.js | 3 ++- .../popover/profile_options_popover.js | 3 ++- .../components/popover/search_popover.js | 4 +++- .../components/popover/sidebar_more_popover.js | 3 ++- .../status_expiration_options_popover.js | 3 ++- .../popover/status_options_popover.js | 1 + .../popover/status_visibility_popover.js | 3 ++- .../components/popover/user_info_popover.js | 1 + .../components/popover/video_stats_popover.js | 3 ++- .../gabsocial/components/profile_header.js | 1 + .../components/profile_navigation_bar.js | 3 ++- .../gabsocial/components/progress_bar.js | 3 ++- .../gabsocial/components/pull_to_refresher.js | 3 ++- .../gabsocial/components/recursive_comment.js | 2 +- .../gabsocial/components/relative_timestamp.js | 1 + .../components/rich_text_editor_bar.js | 5 +++-- .../gabsocial/components/scrollable_list.js | 8 ++++---- app/javascript/gabsocial/components/search.js | 3 ++- app/javascript/gabsocial/components/select.js | 1 + .../components/sensitive_media_item.js | 3 ++- .../gabsocial/components/setting_switch.js | 1 + .../gabsocial/components/settings_sidebar.js | 1 + .../gabsocial/components/shop_item.js | 3 ++- app/javascript/gabsocial/components/sidebar.js | 6 +++--- .../components/sidebar_panel_group.js | 8 ++++---- .../components/sidebar_section_item.js | 3 ++- .../components/sidebar_section_title.js | 3 ++- .../gabsocial/components/sort_block.js | 8 ++++---- app/javascript/gabsocial/components/status.js | 10 +++++----- .../gabsocial/components/status_action_bar.js | 1 + .../components/status_action_bar_item.js | 3 ++- .../gabsocial/components/status_card.js | 1 + .../gabsocial/components/status_check_box.js | 1 + .../gabsocial/components/status_content.js | 1 + .../gabsocial/components/status_header.js | 14 +++++++------- .../gabsocial/components/status_list.js | 10 +++++----- .../gabsocial/components/status_media.js | 1 + .../gabsocial/components/status_prepend.js | 1 + .../components/status_reply_indicator.js | 1 + app/javascript/gabsocial/components/switch.js | 3 ++- app/javascript/gabsocial/components/tab_bar.js | 3 ++- .../gabsocial/components/tab_bar_item.js | 3 ++- app/javascript/gabsocial/components/text.js | 3 ++- .../gabsocial/components/textarea.js | 3 ++- .../components/timeline_compose_block.js | 1 + .../components/timeline_queue_button_header.js | 3 ++- .../gabsocial/components/trends_item.js | 8 ++++---- .../gabsocial/components/upload_area.js | 3 ++- .../gabsocial/components/user_stat.js | 3 ++- app/javascript/gabsocial/components/video.js | 1 + .../gabsocial/components/zoomable_image.js | 4 +++- app/javascript/gabsocial/containers/display.js | 3 ++- .../gabsocial/containers/gabsocial.js | 5 +++-- .../gabsocial/containers/media_container.js | 8 ++++---- .../containers/notification_container.js | 1 + .../gabsocial/containers/status_container.js | 1 + .../gabsocial/features/about/about.js | 3 ++- .../gabsocial/features/about/dmca.js | 3 ++- .../gabsocial/features/about/investors.js | 3 ++- .../gabsocial/features/about/privacy_policy.js | 3 ++- .../gabsocial/features/about/terms_of_sale.js | 3 ++- .../features/about/terms_of_service.js | 3 ++- .../gabsocial/features/account_gallery.js | 1 + .../gabsocial/features/account_timeline.js | 1 + .../gabsocial/features/blocked_accounts.js | 1 + .../gabsocial/features/bookmarked_statuses.js | 1 + .../gabsocial/features/community_timeline.js | 3 ++- .../compose/components/compose_extra_button.js | 3 ++- .../compose/components/compose_form.js | 1 + .../compose/components/emoji_picker_button.js | 3 ++- .../compose/components/expires_post_button.js | 3 ++- .../features/compose/components/gif_form.js | 3 ++- .../compose/components/gif_selector_button.js | 3 ++- .../compose/components/media_upload_button.js | 1 + .../compose/components/media_upload_item.js | 1 + .../features/compose/components/poll_button.js | 3 ++- .../features/compose/components/poll_form.js | 1 + .../components/rich_text_editor_button.js | 3 ++- .../compose/components/schedule_post_button.js | 3 ++- .../components/sensitive_media_button.js | 3 ++- .../compose/components/spoiler_button.js | 3 ++- .../components/status_visibility_button.js | 3 ++- .../features/compose/components/upload_form.js | 1 + .../gabsocial/features/compose/compose.js | 3 ++- .../containers/compose_form_container.js | 1 + .../gabsocial/features/follow_requests.js | 1 + app/javascript/gabsocial/features/followers.js | 1 + app/javascript/gabsocial/features/following.js | 1 + .../gabsocial/features/generic_not_found.js | 3 ++- .../gabsocial/features/group_about.js | 2 +- .../features/group_collection_timeline.js | 8 ++++---- .../gabsocial/features/group_create.js | 6 +++--- .../gabsocial/features/group_members.js | 1 + .../features/group_removed_accounts.js | 1 + .../gabsocial/features/group_timeline.js | 6 +++--- .../gabsocial/features/groups_collection.js | 1 + .../gabsocial/features/hashtag_timeline.js | 3 ++- .../gabsocial/features/home_timeline.js | 3 ++- .../gabsocial/features/introduction.js | 18 +++++++++--------- .../gabsocial/features/liked_statuses.js | 1 + .../gabsocial/features/list_create.js | 3 ++- app/javascript/gabsocial/features/list_edit.js | 1 + .../gabsocial/features/list_timeline.js | 2 +- .../gabsocial/features/lists_directory.js | 1 + app/javascript/gabsocial/features/mutes.js | 1 + app/javascript/gabsocial/features/news.js | 3 ++- .../gabsocial/features/notifications.js | 6 +++--- .../gabsocial/features/pro_timeline.js | 3 ++- app/javascript/gabsocial/features/search.js | 1 + app/javascript/gabsocial/features/shortcuts.js | 1 + app/javascript/gabsocial/features/status.js | 1 + .../gabsocial/features/status_likes.js | 1 + .../gabsocial/features/status_reposts.js | 1 + app/javascript/gabsocial/features/ui/ui.js | 5 +++-- .../gabsocial/features/ui/util/bundle.js | 3 ++- .../gabsocial/features/ui/util/page_title.js | 3 ++- .../features/ui/util/reduced_motion.js | 3 ++- .../ui/util/responsive_classes_component.js | 3 ++- .../features/ui/util/responsive_component.js | 3 ++- .../features/ui/util/wrapped_bundle.js | 3 ++- .../features/ui/util/wrapped_route.js | 3 ++- .../gabsocial/layouts/about_layout.js | 3 ++- .../gabsocial/layouts/default_layout.js | 3 ++- .../gabsocial/layouts/explore_layout.js | 1 + .../gabsocial/layouts/group_layout.js | 1 + .../gabsocial/layouts/introduction_layout.js | 3 ++- app/javascript/gabsocial/layouts/layout.js | 3 ++- .../gabsocial/layouts/profile_layout.js | 1 + .../gabsocial/layouts/settings_layout.js | 3 ++- app/javascript/gabsocial/main.js | 5 +++-- app/javascript/gabsocial/pages/about_page.js | 3 ++- app/javascript/gabsocial/pages/basic_page.js | 3 ++- .../gabsocial/pages/community_page.js | 3 ++- app/javascript/gabsocial/pages/error_page.js | 4 +++- app/javascript/gabsocial/pages/explore_page.js | 3 ++- app/javascript/gabsocial/pages/group_page.js | 6 +++--- app/javascript/gabsocial/pages/groups_page.js | 3 ++- app/javascript/gabsocial/pages/hashtag_page.js | 3 ++- app/javascript/gabsocial/pages/home_page.js | 3 ++- .../gabsocial/pages/introduction_page.js | 3 ++- app/javascript/gabsocial/pages/list_page.js | 1 + app/javascript/gabsocial/pages/lists_page.js | 3 ++- app/javascript/gabsocial/pages/modal_page.js | 3 ++- app/javascript/gabsocial/pages/news_page.js | 3 ++- .../gabsocial/pages/notifications_page.js | 4 ++-- app/javascript/gabsocial/pages/pro_page.js | 3 ++- app/javascript/gabsocial/pages/profile_page.js | 1 + app/javascript/gabsocial/pages/search_page.js | 3 ++- .../gabsocial/pages/settings_page.js | 3 ++- .../gabsocial/pages/shortcuts_page.js | 3 ++- app/javascript/gabsocial/utils/numbers.js | 6 +++--- config/webpack/shared.js | 2 -- 293 files changed, 572 insertions(+), 313 deletions(-) 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 && - + - + }