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 && (