breadcrumbs

This commit is contained in:
Delucse
2020-08-31 13:53:39 +02:00
parent ab95f9eee6
commit d379489a91
3 changed files with 36 additions and 2 deletions
+7 -2
View File
@@ -2,11 +2,16 @@ import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import Breadcrumbs from '../Breadcrumbs';
class Tutorial extends Component {
render() {
console.log(this.props);
return (
<h1>Tutorial {this.props.match.params.tutorialId}</h1>
<div>
<Breadcrumbs content={[{link: '/', title: 'Home'},{link: '/tutorial', title: 'Tutorial'}, {link: `/tutorial/${this.props.match.params.tutorialId}`, title: this.props.match.params.tutorialId}]}/>
<h1>Tutorial {this.props.match.params.tutorialId}</h1>
</div>
);
};
}
+4
View File
@@ -1,5 +1,7 @@
import React, { Component } from 'react';
import Breadcrumbs from '../Breadcrumbs';
import tutorials from './tutorials.json';
import { Link } from 'react-router-dom';
@@ -11,6 +13,8 @@ class TutorialHome extends Component {
render() {
return (
<div>
<Breadcrumbs content={[{link: '/', title: 'Home'},{link: '/tutorial', title: 'Tutorial'}]}/>
<h1>Tutorial-Übersicht</h1>
<Grid container spacing={2}>
{tutorials.map((tutorial, i) => (