Skip to content

Instantly share code, notes, and snippets.

@alexbeletsky
Created November 17, 2017 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexbeletsky/1183235386235e690f455dda238e666e to your computer and use it in GitHub Desktop.
Save alexbeletsky/1183235386235e690f455dda238e666e to your computer and use it in GitHub Desktop.
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