2016-12-20 21:06:02 +02:00
|
|
|
const React = require('react');
|
2017-01-03 00:32:29 +02:00
|
|
|
const ReactRouter = require('react-router');
|
2016-12-20 21:06:02 +02:00
|
|
|
|
2017-01-03 00:32:29 +02:00
|
|
|
const Section = require('./section');
|
|
|
|
const Services = require('@containers/services');
|
|
|
|
const Service = require('@containers/service');
|
|
|
|
|
|
|
|
const {
|
|
|
|
Match
|
|
|
|
} = ReactRouter;
|
|
|
|
|
|
|
|
module.exports = () => {
|
|
|
|
const list = (props) => (
|
|
|
|
<Section {...props}>
|
|
|
|
<Services {...props} />
|
|
|
|
</Section>
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Match
|
|
|
|
component={list}
|
|
|
|
exactly
|
|
|
|
pattern='/:org/projects/:projectId/services'
|
|
|
|
/>
|
|
|
|
<Match
|
|
|
|
component={Service}
|
|
|
|
pattern='/:org/projects/:projectId/services/:serviceId/:section?'
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|