From 4f82cbc046f791eda5ef6ba37aed05ef4f2fabc4 Mon Sep 17 00:00:00 2001 From: Jacobjohnjeevan Date: Thu, 5 Sep 2024 12:39:10 +0530 Subject: [PATCH] rm tooltip after cover image load --- src/Components/Facility/FacilityHome.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/Facility/FacilityHome.tsx b/src/Components/Facility/FacilityHome.tsx index a0dcf06026f..8f0f5a64058 100644 --- a/src/Components/Facility/FacilityHome.tsx +++ b/src/Components/Facility/FacilityHome.tsx @@ -59,6 +59,7 @@ export const FacilityHome = ({ facilityId }: Props) => { const [openDeleteDialog, setOpenDeleteDialog] = useState(false); const [editCoverImage, setEditCoverImage] = useState(false); const [coverImageEdited, setCoverImageEdited] = useState(false); + const [coverImageLoaded, setCoverImageLoaded] = useState(false); const authUser = useAuthUser(); useMessageListener((data) => console.log(data)); @@ -131,8 +132,9 @@ export const FacilityHome = ({ facilityId }: Props) => { src={`${facilityData?.read_cover_image_url}`} alt={facilityData?.name} className="h-full w-full rounded-lg object-cover" + onLoad={() => setCoverImageLoaded(true)} /> - {coverImageEdited && ( + {coverImageEdited && !coverImageLoaded && (
{t("cover_image_updated_note")}