2019-03-03 13:02:29 +03:00
|
|
|
import React from 'react';
|
|
|
|
import { Link } from 'react-router-dom';
|
2019-03-03 13:15:34 +03:00
|
|
|
import * as PropTypes from 'prop-types';
|
2019-03-03 13:02:29 +03:00
|
|
|
|
2019-03-03 13:15:34 +03:00
|
|
|
const propTypes = {
|
|
|
|
to: PropTypes.string,
|
|
|
|
btnText: PropTypes.string,
|
|
|
|
};
|
|
|
|
|
|
|
|
const NotFound = ({ to = '/', btnText = 'Home' }) => (
|
2019-03-03 13:02:29 +03:00
|
|
|
<div className="home">
|
|
|
|
<h2>Oops! We could not find requested route.</h2>
|
|
|
|
<p>
|
|
|
|
Use your browser{'\''}s back button to navigate to the page you have previously come from, or just press this button.
|
|
|
|
</p>
|
|
|
|
<br />
|
2019-03-03 13:15:34 +03:00
|
|
|
<Link to={to} className="btn btn-outline-primary btn-lg">{btnText}</Link>
|
2019-03-03 13:02:29 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
2019-03-03 13:15:34 +03:00
|
|
|
NotFound.propTypes = propTypes;
|
|
|
|
|
2019-03-03 13:02:29 +03:00
|
|
|
export default NotFound;
|