From 66a70b92ccda69bde0152c615208b256b71f5fee Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Tue, 30 Dec 2025 17:36:52 +0100 Subject: [PATCH] refactor: remove unnecessary console log from ContattiProprietarioModal --- .../area-riservata/documenti_personali.tsx | 15 ++++++++++++++- .../src/components/servizio/modale_contatti.tsx | 2 -- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/infoalloggi/src/components/area-riservata/documenti_personali.tsx b/apps/infoalloggi/src/components/area-riservata/documenti_personali.tsx index 4aa3966..1bb8ba5 100644 --- a/apps/infoalloggi/src/components/area-riservata/documenti_personali.tsx +++ b/apps/infoalloggi/src/components/area-riservata/documenti_personali.tsx @@ -1,6 +1,7 @@ import { CircleCheck, ExternalLink, Trash2 } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; +import { useState } from "react"; import toast from "react-hot-toast"; import { getStorageUrl } from "~/lib/storage_utils"; import { useSession } from "~/providers/SessionProvider"; @@ -132,6 +133,7 @@ export const DocumentiUploadSection = ({ isPending: boolean; caricatoNote?: boolean; }) => { + const [imageError, setImageError] = useState(false); if (document?.storageId) { return (
@@ -145,16 +147,27 @@ export const DocumentiUploadSection = ({
{isPending ? ( - ) : ( + ) : !imageError ? ( {title} setImageError(true)} src={getStorageUrl({ storageId: document.storageId, })} width={96} /> + ) : ( +
+ +
)}
{ !servizio.skipControlloDoc && (!servizio.doc_personale_fronte || !servizio.doc_personale_retro); - console.log("needsDocuments", needsDocuments, servizio); - return ( {