diff --git a/js/app.js b/js/app.js index bb32ef50..e2c7e1e6 100644 --- a/js/app.js +++ b/js/app.js @@ -5,7 +5,7 @@ import 'isomorphic-fetch'; import React from 'react'; import ReactDOM from 'react-dom'; -import { Router } from 'react-router'; +import Router from 'react-router/es6/Router'; import AppResolver from './app_resolver'; import history from './history'; diff --git a/js/app_resolver.js b/js/app_resolver.js index 97a8fde5..898063be 100644 --- a/js/app_resolver.js +++ b/js/app_resolver.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Redirect } from 'react-router'; +import Redirect from 'react-router/es6/Redirect'; import Routes from './routes'; diff --git a/js/components/app_base.js b/js/components/app_base.js index 3d14fae5..d6528d28 100644 --- a/js/components/app_base.js +++ b/js/components/app_base.js @@ -2,7 +2,6 @@ import React from 'react'; import classNames from 'classnames'; -import { History } from 'react-router'; import UserActions from '../actions/user_actions'; import UserStore from '../stores/user_store'; @@ -23,6 +22,7 @@ export default function AppBase(App) { propTypes: { children: React.PropTypes.element.isRequired, + //FIXME: test if this is actually passed down now history: React.PropTypes.object.isRequired, location: React.PropTypes.object.isRequired, routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired @@ -35,8 +35,6 @@ export default function AppBase(App) { ); }, - mixins: [History], - componentDidMount() { UserStore.listen(this.onChange); WhitelabelStore.listen(this.onChange); diff --git a/js/components/ascribe_accordion_list/accordion_list.js b/js/components/ascribe_accordion_list/accordion_list.js index 1ce113cb..7bdf937a 100644 --- a/js/components/ascribe_accordion_list/accordion_list.js +++ b/js/components/ascribe_accordion_list/accordion_list.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; +import Link from 'react-router/es6/Link'; import { getLangText } from '../../utils/lang_utils'; diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index bb38564f..bf7207f5 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; +import Link from 'react-router/es6/Link'; let AccordionListItem = React.createClass({ diff --git a/js/components/ascribe_accordion_list/accordion_list_item_piece.js b/js/components/ascribe_accordion_list/accordion_list_item_piece.js index 3ab148ab..f05ce260 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_piece.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_piece.js @@ -1,7 +1,6 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; import AccordionListItem from './accordion_list_item'; import AccordionListItemThumbnailPlacholder from './accordion_list_item_thumbnail_placeholder'; diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 541faa42..40148a4c 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; +import Link from 'react-router/es6/Link'; import Moment from 'moment'; import Row from 'react-bootstrap/lib/Row'; diff --git a/js/components/ascribe_pagination/pagination_button.js b/js/components/ascribe_pagination/pagination_button.js index 130c5ace..b5a7ff92 100644 --- a/js/components/ascribe_pagination/pagination_button.js +++ b/js/components/ascribe_pagination/pagination_button.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; +import Link from 'react-router/es6/Link'; import Glyphicon from 'react-bootstrap/lib/Glyphicon'; import { getLangText } from '../../utils/lang_utils'; diff --git a/js/components/ascribe_table/table_item_wrapper.js b/js/components/ascribe_table/table_item_wrapper.js index 09cf562f..16b3a0ca 100644 --- a/js/components/ascribe_table/table_item_wrapper.js +++ b/js/components/ascribe_table/table_item_wrapper.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; +import Link from 'react-router/es6/Link'; import { ColumnModel } from './models/table_models'; @@ -50,4 +50,4 @@ let TableItemWrapper = React.createClass({ } }); -export default TableItemWrapper; \ No newline at end of file +export default TableItemWrapper; diff --git a/js/components/header_notifications.js b/js/components/header_notifications.js index e01db87b..727c37d1 100644 --- a/js/components/header_notifications.js +++ b/js/components/header_notifications.js @@ -1,7 +1,6 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; import DropdownButton from 'react-bootstrap/lib/DropdownButton'; import Glyphicon from 'react-bootstrap/lib/Glyphicon'; import MenuItem from 'react-bootstrap/lib/MenuItem'; diff --git a/js/components/login_container.js b/js/components/login_container.js index c66d0b21..3e6ff088 100644 --- a/js/components/login_container.js +++ b/js/components/login_container.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; +import Link from 'react-router/es6/Link'; import LoginForm from './ascribe_forms/form_login'; diff --git a/js/components/signup_container.js b/js/components/signup_container.js index 7fea7ff5..a974776d 100644 --- a/js/components/signup_container.js +++ b/js/components/signup_container.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Link } from 'react-router'; +import Link from 'react-router/es6/Link'; import SignupForm from './ascribe_forms/form_signup'; diff --git a/js/components/whitelabel/wallet/wallet_app_resolver.js b/js/components/whitelabel/wallet/wallet_app_resolver.js index bd0daacd..bc264c84 100644 --- a/js/components/whitelabel/wallet/wallet_app_resolver.js +++ b/js/components/whitelabel/wallet/wallet_app_resolver.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Redirect } from 'react-router'; +import Redirect from 'react-router/es6/Redirect'; import getWalletApiUrls from './constants/wallet_api_urls'; import getWalletRoutes from './wallet_routes'; diff --git a/js/components/whitelabel/wallet/wallet_routes.js b/js/components/whitelabel/wallet/wallet_routes.js index fe1d9161..0b8e6703 100644 --- a/js/components/whitelabel/wallet/wallet_routes.js +++ b/js/components/whitelabel/wallet/wallet_routes.js @@ -1,5 +1,6 @@ import React from 'react'; -import { Route, IndexRoute } from 'react-router'; +import IndexRoute from 'react-router/es6/IndexRoute'; +import Route from 'react-router/es6/Route'; import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler'; diff --git a/js/history.js b/js/history.js index 3c138cf3..31ae4333 100644 --- a/js/history.js +++ b/js/history.js @@ -1,6 +1,6 @@ 'use strict'; -import { useRouterHistory } from 'react-router'; +import useRouterHistory from 'react-router/es6/useRouterHistory'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import AppConstants from './constants/application_constants'; diff --git a/js/routes.js b/js/routes.js index 442f0c4d..44214ff2 100644 --- a/js/routes.js +++ b/js/routes.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Route } from 'react-router'; +import Route from 'react-router/es6/Route'; import AscribeApp from './components/ascribe_app';