From 2c8a5405bb7ca2e5db53e1bb408880cf308e35d7 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Sat, 17 Feb 2024 14:37:32 -0600 Subject: [PATCH] more --- src/pageElements/Cards.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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.";