error page requesting a tutorial that does not (longer) exist

This commit is contained in:
Delucse
2020-09-02 11:43:17 +02:00
parent bcc4c35c9e
commit ccf901d20b
10 changed files with 78 additions and 21 deletions
+32 -2
View File
@@ -1,11 +1,41 @@
import React, { Component } from 'react';
import Breadcrumbs from './Breadcrumbs';
import { withRouter } from 'react-router-dom';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
class NotFound extends Component {
render() {
return (
<h1>404 Not Found</h1>
<div>
<Breadcrumbs content={[{link: '/', title: 'Home'}, {link: this.props.location.pathname, title: 'Error'}]}/>
<Typography variant='h4' style={{marginBottom: '5px'}}>Die von Ihnen angeforderte Seite kann nicht gefunden werden.</Typography>
<Typography variant='body1'>Die gesuchte Seite wurde möglicherweise entfernt, ihr Name wurde geändert oder sie ist vorübergehend nicht verfügbar.</Typography>
{this.props.button ?
<Button
style={{marginTop: '20px'}}
variant="contained"
color="primary"
onClick={() => {this.props.history.push(this.props.button.link)}}
>
{this.props.button.title}
</Button>
:
<Button
style={{marginTop: '20px'}}
variant="contained"
color="primary"
onClick={() => {this.props.history.push('/')}}
>
Zurück zur Startseite
</Button>
}
</div>
);
};
}
export default NotFound;
export default withRouter(NotFound);