fetch single jobs

pull/3232/head
Berkeley Martinez 2015-08-31 14:32:31 -07:00
parent 9e947fa094
commit 451c3acb2e
1 changed files with 8 additions and 0 deletions

View File

@ -13,8 +13,16 @@ export default contain(
{
store: 'jobsStore',
fetchAction: 'jobActions.getJob',
map({ currentJob }) {
return {
job: currentJob
};
},
getPayload({ params }) {
return { id: params.id };
},
shouldContainerFetch({ currentJob = {} }, { currentJob: nextJob = {}}) {
return currentJob.id !== nextJob.id;
}
},
React.createClass({