Skip to content

Commit

Permalink
rm tooltip after cover image load
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobjeevan committed Sep 5, 2024
1 parent 8b7cdb7 commit 4f82cbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/Facility/FacilityHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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 && (
<div className="absolute inset-x-0 bottom-0 w-full rounded-b-md bg-black/70 px-2 pb-0.5 backdrop-blur-sm">
<span className="text-center text-xs font-medium text-secondary-100">
{t("cover_image_updated_note")}
Expand Down

0 comments on commit 4f82cbc

Please sign in to comment.