mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Import from react-router-dom instead of react-router
This commit is contained in:
parent
c11fbe90e6
commit
be2fcdf793
17 changed files with 18 additions and 18 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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 () => (
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 () => (
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue