1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 17:45:10 +01:00
onion/js/third_party/raven.js
2015-10-06 16:47:59 +02:00

29 lines
570 B
JavaScript

'use strict';
import { altThirdParty } 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 altThirdParty.createStore(RavenHandler, 'RavenHandler');