import React from "react"; // import API from "../config/API"; import DateUtils from "../utils/DateUtils"; const IncidentUpdate = ({ update, admin }) => { // async loadUpdates() { // this.updates = await Api.incident_updates(this.incident) // } const deleteUpdate = (update) => { alert("Delete Incident:", update.incident); // const res = await API.incident_update_delete(update); // if (res.status === "success") { // this.onUpdate(); // } }; return (
{update.message} {admin && ( )} Posted {DateUtils.ago(update.created_at)} ago.{" "} {DateUtils.format( DateUtils.parseISO(update.created_at), "MMM d, yyyy - HH:mm" )}
); }; export default IncidentUpdate;