28 lines
451 B
JavaScript
28 lines
451 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types';
|
|
import { Link} from 'react-router-dom';
|
|
|
|
import Fetch from '../components/fetch';
|
|
|
|
export default function Entity({apiRoute, title}) {
|
|
return(
|
|
<>
|
|
<Link
|
|
to='/'
|
|
>
|
|
<button>
|
|
Home
|
|
</button>
|
|
</Link>
|
|
<Fetch
|
|
route={apiRoute}
|
|
title={title}
|
|
/>
|
|
</>
|
|
);
|
|
};
|
|
Entity.propTypes = {
|
|
apiRoute: PropTypes.string,
|
|
title: PropTypes.string
|
|
};
|