From 451c3acb2ef0e3c98c82a7315c567f55a4088cb8 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 31 Aug 2015 14:32:31 -0700 Subject: [PATCH] fetch single jobs --- common/app/routes/Jobs/components/Show.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/app/routes/Jobs/components/Show.jsx b/common/app/routes/Jobs/components/Show.jsx index 43bb22c667..99f473d14f 100644 --- a/common/app/routes/Jobs/components/Show.jsx +++ b/common/app/routes/Jobs/components/Show.jsx @@ -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({