contentRoutes.js
650 Bytes
import React from 'react'
import { Switch, Route } from 'react-router-dom'
import Content1 from '../pages/content/Content1'
import Content2 from '../pages/content/Content2'
import Content3 from '../pages/content/Content3'
import Introduction from '../pages/content/introduction/Introduction'
export default ({ match }) => {
return (
<Switch>
<Route path={`${match.url}/content1`} component={Content1} />
<Route path={`${match.url}/content2`} component={Content2} />
<Route path={`${match.url}/content3`} component={Content3} />
<Route path={`${match.url}/introduction`} component={Introduction} />
</Switch>
)
}