mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
Separate dispatcher logic of whitelabel and user stores
This commit is contained in:
parent
000719e14d
commit
f5c06e070c
@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { alt } from '../alt';
|
import { altUser } from '../alt';
|
||||||
import UserFetcher from '../fetchers/user_fetcher';
|
import UserFetcher from '../fetchers/user_fetcher';
|
||||||
|
|
||||||
|
|
||||||
@ -34,4 +34,4 @@ class UserActions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default alt.createActions(UserActions);
|
export default altUser.createActions(UserActions);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { alt } from '../alt';
|
import { altWhitelabel } from '../alt';
|
||||||
import WhitelabelFetcher from '../fetchers/whitelabel_fetcher';
|
import WhitelabelFetcher from '../fetchers/whitelabel_fetcher';
|
||||||
|
|
||||||
|
|
||||||
@ -26,4 +26,4 @@ class WhitelabelActions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default alt.createActions(WhitelabelActions);
|
export default altWhitelabel.createActions(WhitelabelActions);
|
||||||
|
@ -4,3 +4,5 @@ import Alt from 'alt';
|
|||||||
|
|
||||||
export let alt = new Alt();
|
export let alt = new Alt();
|
||||||
export let altThirdParty = new Alt();
|
export let altThirdParty = new Alt();
|
||||||
|
export let altUser = new Alt();
|
||||||
|
export let altWhitelabel = new Alt();
|
||||||
|
@ -4,7 +4,7 @@ import React from 'react';
|
|||||||
import Router from 'react-router';
|
import Router from 'react-router';
|
||||||
|
|
||||||
import UserActions from '../actions/user_actions';
|
import UserActions from '../actions/user_actions';
|
||||||
import { alt } from '../alt';
|
import { alt, altWhitelabel, altUser, altThirdParty } from '../alt';
|
||||||
|
|
||||||
import AppConstants from '../constants/application_constants';
|
import AppConstants from '../constants/application_constants';
|
||||||
let baseUrl = AppConstants.baseUrl;
|
let baseUrl = AppConstants.baseUrl;
|
||||||
@ -16,7 +16,10 @@ let LogoutContainer = React.createClass({
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
UserActions.logoutCurrentUser()
|
UserActions.logoutCurrentUser()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
Alt.flush();
|
alt.flush();
|
||||||
|
altWhitelabel.flush();
|
||||||
|
altUser.flush();
|
||||||
|
altThirdParty.flush();
|
||||||
// kill intercom (with fire)
|
// kill intercom (with fire)
|
||||||
window.Intercom('shutdown');
|
window.Intercom('shutdown');
|
||||||
this.replaceWith(baseUrl);
|
this.replaceWith(baseUrl);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { alt } from '../alt';
|
import { altUser } from '../alt';
|
||||||
import UserActions from '../actions/user_actions';
|
import UserActions from '../actions/user_actions';
|
||||||
|
|
||||||
|
|
||||||
@ -18,4 +18,4 @@ class UserStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default alt.createStore(UserStore, 'UserStore');
|
export default altUser.createStore(UserStore, 'UserStore');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { alt } from '../alt';
|
import { altWhitelabel } from '../alt';
|
||||||
import WhitelabelActions from '../actions/whitelabel_actions';
|
import WhitelabelActions from '../actions/whitelabel_actions';
|
||||||
|
|
||||||
|
|
||||||
@ -15,4 +15,4 @@ class WhitelabelStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default alt.createStore(WhitelabelStore, 'WhitelabelStore');
|
export default altWhitelabel.createStore(WhitelabelStore, 'WhitelabelStore');
|
||||||
|
Loading…
Reference in New Issue
Block a user