1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Only import what we need from react-router

Unfortunately webpack doesn’t understand jsnext:main declarations yet,
so we have to do this ourselves by using react-router’s es6 build
This commit is contained in:
Brett Sun 2016-06-06 14:54:29 +02:00
parent 30c03783d1
commit d1dfdbdbec
16 changed files with 16 additions and 19 deletions

View File

@ -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';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { Redirect } from 'react-router';
import Redirect from 'react-router/es6/Redirect';
import Routes from './routes';

View File

@ -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);

View File

@ -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';

View File

@ -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({

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;
export default TableItemWrapper;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';