mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 18:13:49 +01:00
29 lines
546 B
JavaScript
29 lines
546 B
JavaScript
|
'use strict';
|
||
|
|
||
|
import alt from '../alt';
|
||
|
import EventActions from '../actions/event_actions';
|
||
|
|
||
|
import Raven from 'raven-js';
|
||
|
|
||
|
|
||
|
class RavenHandler {
|
||
|
constructor() {
|
||
|
this.bindActions(EventActions);
|
||
|
this.loaded = false;
|
||
|
}
|
||
|
|
||
|
onProfileDidLoad(profile) {
|
||
|
if (this.loaded) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
Raven.setUserContext({
|
||
|
email: profile.email
|
||
|
});
|
||
|
console.log('Raven loaded');
|
||
|
this.loaded = true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default alt.createStore(RavenHandler, 'RavenHandler');
|