update markdown editor and renderer

This commit is contained in:
Mario Pesch
2022-02-22 11:18:51 +01:00
parent 115e4acc6c
commit 39c8fd504f
4 changed files with 17 additions and 10 deletions
+7 -3
View File
@@ -355,9 +355,13 @@ class Builder extends Component {
};
render() {
var filteredTutorials = this.props.tutorials.filter(
(tutorial) => tutorial.creator === this.props.user.email
);
if (this.props.user.role === "admin") {
var filteredTutorials = this.props.tutorials;
} else {
filteredTutorials = this.props.tutorials.filter(
(tutorial) => tutorial.creator === this.props.user.email
);
}
return (
<div>
<Breadcrumbs