upgraded to react router v4

This commit is contained in:
Jori Lallo
2017-05-17 00:11:13 -07:00
parent f70e2326c0
commit b25298c8f1
23 changed files with 245 additions and 230 deletions

View File

@ -1,6 +1,5 @@
// @flow
import _ from 'lodash';
import { browserHistory } from 'react-router';
import stores from 'stores';
type Options = {
@ -63,15 +62,15 @@ class ApiClient {
return response;
}
// Handle 404
if (response.status === 404) {
return browserHistory.push('/404');
}
// // Handle 404
// if (response.status === 404) {
// // return browserHistory.push('/404');
// }
// Handle 401, log out user
if (response.status === 401) {
return stores.user.logout();
}
// // Handle 401, log out user
// if (response.status === 401) {
// return stores.user.logout();
// }
// Handle failed responses
const error = {};