diff options
Diffstat (limited to 'src/containers/Service/Service.tsx')
-rw-r--r-- | src/containers/Service/Service.tsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/containers/Service/Service.tsx b/src/containers/Service/Service.tsx new file mode 100644 index 0000000..3a7cbee --- /dev/null +++ b/src/containers/Service/Service.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { Route, Switch, useRouteMatch } from 'react-router-dom'; +import ServiceList from './ServiceList'; +import ServiceForm from './ServiceForm'; + + +const Service: React.FC = () => { + const { path } = useRouteMatch(); + + return ( + <Switch> + <Route exact path={path} component={ServiceList} /> + <Route path={`${path}/add`} component={ServiceForm} /> + <Route path={`${path}/edit/:id`} component={ServiceForm} /> + </Switch> + ); +}; + +export default Service; |