Created
November 17, 2017 13:32
-
-
Save alexbeletsky/1183235386235e690f455dda238e666e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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