| | |
| | | import {Link, Route} from 'react-router-dom'; |
| | | import {BreadcrumbItem} from 'reactstrap'; |
| | | |
| | | // Attention: Recursive Call |
| | | // https://reacttraining.com/react-router/web/example/recursive-paths |
| | | function BreadcrumbPath({match}) { |
| | | return ( |
| | | <React.Fragment> |
| | |
| | | <Route |
| | | path={`${match.url}/:path`} |
| | | component={BreadcrumbPath} |
| | | /* |
| | | render={props => |
| | | <BreadcrumbPath {...props} match={match} changeCurrentDirectory={changeCurrentDirectory} /> |
| | | } |
| | | */ |
| | | /> |
| | | </React.Fragment> |
| | | ) |
| | |
| | | } |
| | | |
| | | handleURLChange = location => { |
| | | // Replacing matched URL(archiveId, repoId) and removing trailing slashes |
| | | this.changeCurrentDirectory(location.pathname.replace(this.props.match.url, '').replace(/^\/|\/$/g, '')); |
| | | }; |
| | | |