refactor: Import from react-router/lib (#3117)
parent
79ef8b3653
commit
07e875972a
|
@ -13,14 +13,12 @@ import {
|
||||||
import { showOnboardingOnce } from '../actions/onboarding';
|
import { showOnboardingOnce } from '../actions/onboarding';
|
||||||
import { updateNotifications, refreshNotifications } from '../actions/notifications';
|
import { updateNotifications, refreshNotifications } from '../actions/notifications';
|
||||||
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
||||||
import {
|
import applyRouterMiddleware from 'react-router/lib/applyRouterMiddleware';
|
||||||
applyRouterMiddleware,
|
import useRouterHistory from 'react-router/lib/useRouterHistory';
|
||||||
useRouterHistory,
|
import Router from 'react-router/lib/Router';
|
||||||
Router,
|
import Route from 'react-router/lib/Route';
|
||||||
Route,
|
import IndexRedirect from 'react-router/lib/IndexRedirect';
|
||||||
IndexRedirect,
|
import IndexRoute from 'react-router/lib/IndexRoute';
|
||||||
IndexRoute
|
|
||||||
} from 'react-router';
|
|
||||||
import { useScroll } from 'react-router-scroll';
|
import { useScroll } from 'react-router-scroll';
|
||||||
import UI from '../features/ui';
|
import UI from '../features/ui';
|
||||||
import Status from '../features/status';
|
import Status from '../features/status';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import DropdownMenu from '../../../components/dropdown_menu';
|
import DropdownMenu from '../../../components/dropdown_menu';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
import { defineMessages, injectIntl, FormattedMessage, FormattedNumber } from 'react-intl';
|
import { defineMessages, injectIntl, FormattedMessage, FormattedNumber } from 'react-intl';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
|
|
|
@ -5,7 +5,7 @@ import IconButton from '../../../components/icon_button';
|
||||||
import DisplayName from '../../../components/display_name';
|
import DisplayName from '../../../components/display_name';
|
||||||
import Permalink from '../../../components/permalink';
|
import Permalink from '../../../components/permalink';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
|
|
||||||
class NavigationBar extends ImmutablePureComponent {
|
class NavigationBar extends ImmutablePureComponent {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||||
import AccountContainer from '../../../containers/account_container';
|
import AccountContainer from '../../../containers/account_container';
|
||||||
import StatusContainer from '../../../containers/status_container';
|
import StatusContainer from '../../../containers/status_container';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
|
|
||||||
class SearchResults extends ImmutablePureComponent {
|
class SearchResults extends ImmutablePureComponent {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import NavigationContainer from './containers/navigation_container';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { mountCompose, unmountCompose } from '../../actions/compose';
|
import { mountCompose, unmountCompose } from '../../actions/compose';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
import { injectIntl, defineMessages } from 'react-intl';
|
import { injectIntl, defineMessages } from 'react-intl';
|
||||||
import SearchContainer from './containers/search_container';
|
import SearchContainer from './containers/search_container';
|
||||||
import { Motion, spring } from 'react-motion';
|
import { Motion, spring } from 'react-motion';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
import Column from '../ui/components/column';
|
import Column from '../ui/components/column';
|
||||||
import ColumnLink from '../ui/components/column_link';
|
import ColumnLink from '../ui/components/column_link';
|
||||||
import ColumnSubheading from '../ui/components/column_subheading';
|
import ColumnSubheading from '../ui/components/column_subheading';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import StatusListContainer from '../ui/containers/status_list_container';
|
||||||
import Column from '../ui/components/column';
|
import Column from '../ui/components/column';
|
||||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||||
import ColumnSettingsContainer from './containers/column_settings_container';
|
import ColumnSettingsContainer from './containers/column_settings_container';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
title: { id: 'column.home', defaultMessage: 'Home' }
|
title: { id: 'column.home', defaultMessage: 'Home' }
|
||||||
|
|
|
@ -7,7 +7,7 @@ import StatusContent from '../../../components/status_content';
|
||||||
import MediaGallery from '../../../components/media_gallery';
|
import MediaGallery from '../../../components/media_gallery';
|
||||||
import VideoPlayer from '../../../components/video_player';
|
import VideoPlayer from '../../../components/video_player';
|
||||||
import AttachmentList from '../../../components/attachment_list';
|
import AttachmentList from '../../../components/attachment_list';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
import { FormattedDate, FormattedNumber } from 'react-intl';
|
import { FormattedDate, FormattedNumber } from 'react-intl';
|
||||||
import CardContainer from '../containers/card_container';
|
import CardContainer from '../containers/card_container';
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
|
|
||||||
const ColumnLink = ({ icon, text, to, href, method, hideOnMobile }) => {
|
const ColumnLink = ({ icon, text, to, href, method, hideOnMobile }) => {
|
||||||
if (href) {
|
if (href) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'react-router';
|
import Link from 'react-router/lib/Link';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
class TabsBar extends React.Component {
|
class TabsBar extends React.Component {
|
||||||
|
|
Reference in New Issue