mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
25.27.2019 664580f272d978ece9a1889e91c16bd084bdb1a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React from 'react';
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>
            <BreadcrumbItem>
                <Link to={`${match.url}/`}>
                    {match.params.path || 'Top'}
                </Link>
            </BreadcrumbItem>
            <Route
                path={`${match.url}/:path`}
                component={BreadcrumbPath}
            />
        </React.Fragment>
    )
}
 
export default BreadcrumbPath;