Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import constants from '../../constants';
export function loadedDashboardState(website, status, news, revenues) {
return trackable({
type: constants.DASHBOARD_STATE_LOADED,
payload: { website, status, news, revenues }
},
'Dashboard opened', // <- event name
{ name: website.name } // <- additional event data
);
}
export function loadingDashboardStateFailed(err, resp) {
return trackable({
type: constants.DASHBOARD_STATE_LOADING_FAILED,
payload: { err, resp }
},
'Dashboard loading failed',
{ error: resp.text }
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment