24 lines
434 B
JavaScript
Executable File
24 lines
434 B
JavaScript
Executable File
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const Infobox = (props) => {
|
|
const { dataAggiornamento } = props;
|
|
|
|
return (
|
|
<div>
|
|
<span className="font-weight-bold">Ultimo aggiornamento: </span>
|
|
{ dataAggiornamento.split('T')[0] }
|
|
</div>
|
|
);
|
|
};
|
|
|
|
Infobox.defaultProps = {
|
|
dataAggiornamento: 'n.d.',
|
|
};
|
|
|
|
Infobox.propTypes = {
|
|
dataAggiornamento: PropTypes.string,
|
|
};
|
|
|
|
export default Infobox;
|