Import from react-router-dom instead of react-router

This commit is contained in:
Kimmo Puputti 2017-02-14 09:43:37 +02:00
parent c11fbe90e6
commit be2fcdf793
17 changed files with 18 additions and 18 deletions

View file

@ -25,7 +25,7 @@ const qs = require('qs');
const url = require('url');
const _ = require('lodash');
const React = require('react');
const { createServerRenderContext } = require('react-router');
const { createServerRenderContext } = require('react-router-dom');
const sagaEffects = require('redux-saga/effects');
const auth = require('./auth');
const sdk = require('./fakeSDK');

View file

@ -1,5 +1,5 @@
import React, { PropTypes } from 'react';
import { Miss } from 'react-router';
import { Miss } from 'react-router-dom';
import { RouterProvider, RoutesProvider } from './components';
import { NotFoundPage, MatchWithSubRoutes } from './containers';
import { flattenRoutes } from './routesConfiguration';

View file

@ -1,7 +1,7 @@
import React, { PropTypes } from 'react';
import ReactDOMServer from 'react-dom/server';
import Helmet from 'react-helmet';
import { BrowserRouter, ServerRouter } from 'react-router';
import { BrowserRouter, ServerRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import { IntlProvider, addLocaleData } from 'react-intl';
import en from 'react-intl/locale-data/en';

View file

@ -2,7 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import ReactDOMServer from 'react-dom/server';
import { forEach } from 'lodash';
import { createServerRenderContext } from 'react-router';
import { createServerRenderContext } from 'react-router-dom';
import { ClientApp, ServerApp } from './app';
import configureStore from './store';

View file

@ -4,7 +4,7 @@
* (Helps to narrow down the scope of possible format changes to routes.)
*/
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { pathByRouteName } from '../../routesConfiguration';
const NamedLink = (props, context) => {

View file

@ -4,7 +4,7 @@
* (Helps to narrow down the scope of possible format changes to routes.)
*/
import React, { PropTypes } from 'react';
import { Redirect } from 'react-router';
import { Redirect } from 'react-router-dom';
import { pathByRouteName } from '../../routesConfiguration';
const NamedRedirect = (props, context) => {

View file

@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Link, Redirect } from 'react-router';
import { Link, Redirect } from 'react-router-dom';
import { PageLayout } from '../../components';
import { LoginForm, SignUpForm } from '../../containers';
import { login } from '../../ducks/Auth.ducks';

View file

@ -1,5 +1,5 @@
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { PageLayout } from '../../components';
const toPath = (filter, id) => {

View file

@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { NamedLink, PageLayout } from '../../components';
import css from './ListingPage.css';

View file

@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { PageLayout } from '../../components';
export default () => (

View file

@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Match, Redirect } from 'react-router';
import { Match, Redirect } from 'react-router-dom';
import routesConfiguration, { pathByRouteName } from '../../routesConfiguration';
// wrap `Match` and use this everywhere instead, then when

View file

@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { PageLayout } from '../../components';
export default () => (

View file

@ -1,6 +1,6 @@
/* eslint-disable react/no-unescaped-entities */
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { PageLayout } from '../../components';
const SalesConversationPage = props => {

View file

@ -1,5 +1,5 @@
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { map, size } from 'lodash';
import * as allExamples from '../../examples';

View file

@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';
import { logout } from '../../ducks/Auth.ducks';
import css from './Topbar.css';

View file

@ -1,9 +1,9 @@
import React from 'react';
import { find } from 'lodash';
import { Redirect } from 'react-router';
import { Redirect } from 'react-router-dom';
// This will change to `matchPath` soonish
import matchPattern from 'react-router/matchPattern';
import matchPattern from 'react-router-dom/matchPattern';
import pathToRegexp from 'path-to-regexp';
import {

View file

@ -3,7 +3,7 @@ import renderer from 'react-test-renderer';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import { IntlProvider } from 'react-intl';
import { BrowserRouter } from 'react-router';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import configureStore from '../store';