Created
June 10, 2016 06:13
-
-
Save sunify/79a416dcde42aeb01ed4791dc77f463a 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
export default function* campaignsLoading(getState) { | |
yield takeEvery(LOCATION_CHANGE, function* ({ payload }) { | |
if (payload.pathname === '/campaigns') { | |
yield runAfterUserRestore(getState, function* () { | |
// грузим кампании, переходим к первой | |
}); | |
} else if (payload.pathname.startsWith('/campaigns')) { // catch transition to campaign page | |
yield runAfterUserRestore(getState, function* () { // eslint-disable-line | |
// грузим все кампании и статистику по нужной | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment