1
0
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:
Tim Daubenschütz 2015-10-07 09:31:38 +02:00
parent 000719e14d
commit f5c06e070c
6 changed files with 15 additions and 10 deletions

View File

@ -1,6 +1,6 @@
'use strict';
import { alt } from '../alt';
import { altUser } from '../alt';
import UserFetcher from '../fetchers/user_fetcher';
@ -34,4 +34,4 @@ class UserActions {
}
}
export default alt.createActions(UserActions);
export default altUser.createActions(UserActions);

View File

@ -1,6 +1,6 @@
'use strict';
import { alt } from '../alt';
import { altWhitelabel } from '../alt';
import WhitelabelFetcher from '../fetchers/whitelabel_fetcher';
@ -26,4 +26,4 @@ class WhitelabelActions {
}
}
export default alt.createActions(WhitelabelActions);
export default altWhitelabel.createActions(WhitelabelActions);

View File

@ -4,3 +4,5 @@ import Alt from 'alt';
export let alt = new Alt();
export let altThirdParty = new Alt();
export let altUser = new Alt();
export let altWhitelabel = new Alt();

View File

@ -4,7 +4,7 @@ import React from 'react';
import Router from 'react-router';
import UserActions from '../actions/user_actions';
import { alt } from '../alt';
import { alt, altWhitelabel, altUser, altThirdParty } from '../alt';
import AppConstants from '../constants/application_constants';
let baseUrl = AppConstants.baseUrl;
@ -16,7 +16,10 @@ let LogoutContainer = React.createClass({
componentDidMount() {
UserActions.logoutCurrentUser()
.then(() => {
Alt.flush();
alt.flush();
altWhitelabel.flush();
altUser.flush();
altThirdParty.flush();
// kill intercom (with fire)
window.Intercom('shutdown');
this.replaceWith(baseUrl);

View File

@ -1,6 +1,6 @@
'use strict';
import { alt } from '../alt';
import { altUser } from '../alt';
import UserActions from '../actions/user_actions';
@ -18,4 +18,4 @@ class UserStore {
}
}
export default alt.createStore(UserStore, 'UserStore');
export default altUser.createStore(UserStore, 'UserStore');

View File

@ -1,6 +1,6 @@
'use strict';
import { alt } from '../alt';
import { altWhitelabel } from '../alt';
import WhitelabelActions from '../actions/whitelabel_actions';
@ -15,4 +15,4 @@ class WhitelabelStore {
}
}
export default alt.createStore(WhitelabelStore, 'WhitelabelStore');
export default altWhitelabel.createStore(WhitelabelStore, 'WhitelabelStore');