mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-07 19:08:37 +03:00
28 lines
762 B
JavaScript
28 lines
762 B
JavaScript
import copy from "../../../common/data/copy.json";
|
|
import { isNotNullNorUndefined } from "../../../common/utilities";
|
|
|
|
const CardTime = ({ title = "Timestamp", timelabel, language, precision }) => {
|
|
const unknownLang = copy[language].cardstack.unknown_time;
|
|
|
|
if (isNotNullNorUndefined(timelabel)) {
|
|
return (
|
|
<div className="card-cell">
|
|
{/* <i className="material-icons left">today</i> */}
|
|
<h4>{title}</h4>
|
|
{timelabel}
|
|
{precision && precision !== "" ? ` - ${precision}` : null}
|
|
</div>
|
|
);
|
|
} else {
|
|
return (
|
|
<div className="card-cell">
|
|
{/* <i className="material-icons left">today</i> */}
|
|
<h4>{title}</h4>
|
|
{unknownLang}
|
|
</div>
|
|
);
|
|
}
|
|
};
|
|
|
|
export default CardTime;
|