From f281d05625da04fe663ceaa1ac78226d010e1056 Mon Sep 17 00:00:00 2001 From: ledouxm Date: Wed, 10 Jul 2024 10:28:23 +0200 Subject: [PATCH] add logs --- packages/frontend/src/routes/pdf.$reportId.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/frontend/src/routes/pdf.$reportId.tsx b/packages/frontend/src/routes/pdf.$reportId.tsx index 2d29fed1..80d3f388 100644 --- a/packages/frontend/src/routes/pdf.$reportId.tsx +++ b/packages/frontend/src/routes/pdf.$reportId.tsx @@ -71,6 +71,8 @@ export const PDF = () => { createdAt: reportQuery.results!.createdAt.toISOString(), }); + console.log({ snapshotReport, report: reportQuery.results, diff }); + if (Object.keys(diff).length) return null; return snapshot.html!; @@ -218,20 +220,6 @@ export const PDF = () => { ); }; -// const getStoredHtmlString = (report: Report) => { -// const reportSnapshotRaw = localStorage.getItem("report-" + report.id); -// if (!reportSnapshotRaw) return null; - -// const reportSnapshot = JSON.parse(reportSnapshotRaw); -// const diff = getDiff(reportSnapshot, { ...report, createdAt: report.createdAt.toISOString() }); - -// if (Object.keys(diff).length) return null; - -// const htmlString = localStorage.getItem("report-html-" + report.id); - -// return htmlString; -// }; - const SendForm = ({ children, generatePdf,