diff --git a/src/pageElements/Cards.js b/src/pageElements/Cards.js index e8b3dff..7d990a6 100644 --- a/src/pageElements/Cards.js +++ b/src/pageElements/Cards.js @@ -275,9 +275,16 @@ export const DocCard = (props) => { confirmDelete, createdAt, } = props; + const createdAtTime = createdAt?.seconds + ? createdAt?.seconds + : new Date().getTime(); const now = new Date().getTime(); - const uploadedAt = createdAt ? createdAt.toDate() : new Date().getTime(); + const uploadedAt = new Date(createdAtTime * 1000); const isReportable = Math.round((now - uploadedAt) / 60 / 1000) > 15; + console.log( + "(now - uploadedAt) / 60 / 1000)", + (now - uploadedAt) / 60 / 1000 + ); const disabled = docType ? false : true; const tooltipText = "Parsing is taking a bit longer than usual. This usually resolves within 15 minutes. If it does not, click “report” and support will address the issue within 24 hours.";