diff --git a/common/app/Cat.js b/common/app/Cat.js index 3a7c3246e6f..383409b24c0 100644 --- a/common/app/Cat.js +++ b/common/app/Cat.js @@ -1,11 +1,17 @@ import { Cat } from 'thundercats'; -import { HikesActions, HikesStore } from './routes/Hikes/flux'; + import { AppActions, AppStore } from './flux'; +import { HikesActions, HikesStore } from './routes/Hikes/flux'; +import { JobActions, JobsStore} from './routes/Jobs/flux'; export default Cat() .init(({ instance: cat, args: [services] }) => { cat.register(AppActions, null, services); cat.register(AppStore, null, cat); + cat.register(HikesActions, null, services); cat.register(HikesStore, null, cat); + + cat.register(JobActions, null, services); + cat.register(JobsStore, null, cat); }); diff --git a/common/app/routes/Jobs/components/Jobs.jsx b/common/app/routes/Jobs/components/Jobs.jsx index 87546ba570a..4e96e483ba1 100644 --- a/common/app/routes/Jobs/components/Jobs.jsx +++ b/common/app/routes/Jobs/components/Jobs.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { contain } from 'thundercats'; +import { contain } from 'thundercats-react'; import { Grid, Row } from 'react-bootstrap'; export default contain( diff --git a/common/app/routes/Jobs/flux/Store.js b/common/app/routes/Jobs/flux/Store.js index aa71d71197b..fc1856613bc 100644 --- a/common/app/routes/Jobs/flux/Store.js +++ b/common/app/routes/Jobs/flux/Store.js @@ -2,7 +2,7 @@ import { Store } from 'thundercats'; export default Store() .refs({ displayName: 'JobsStore' }) - .init(({ instane: jobsStore, args: [cat] }) => { + .init(({ instance: jobsStore, args: [cat] }) => { let jobsActions = cat.getActions('JobsActions'); - jobsStore.register(jobsActions); + jobsStore.register(jobsActions.getJob); }); diff --git a/common/app/routes/Jobs/flux/index.js b/common/app/routes/Jobs/flux/index.js new file mode 100644 index 00000000000..de123cba0d5 --- /dev/null +++ b/common/app/routes/Jobs/flux/index.js @@ -0,0 +1,2 @@ +export { default as JobActions } from './Actions'; +export { default as JobsStore } from './Store'; diff --git a/common/app/routes/Jobs/index.js b/common/app/routes/Jobs/index.js index 88bab9f6eb8..9d52bf2b538 100644 --- a/common/app/routes/Jobs/index.js +++ b/common/app/routes/Jobs/index.js @@ -9,10 +9,6 @@ import Jobs from './components/Jobs.jsx'; */ export default { - path: '/jobs/(:jobId)', - getComponents(cb) { - setTimeout(() => { - cb(null, Jobs); - }, 0); - } + path: 'jobs', + component: Jobs }; diff --git a/common/app/routes/index.js b/common/app/routes/index.js index a8e3e6a0140..973e9f2bf01 100644 --- a/common/app/routes/index.js +++ b/common/app/routes/index.js @@ -1,4 +1,4 @@ -// import Jobs from './Jobs'; +import Jobs from './Jobs'; import Hikes from './Hikes'; export default { @@ -6,7 +6,7 @@ export default { getChildRoutes(locationState, cb) { setTimeout(() => { cb(null, [ - // Jobs, + Jobs, Hikes ]); }, 0);