feat(clinic): improve image handling and map integration in clinic components

This commit is contained in:
hamed
2026-06-18 15:21:19 +03:30
parent ecb77fcfa8
commit fdb5866562
4 changed files with 25 additions and 14 deletions
@@ -41,7 +41,11 @@ function Contact({ data }) {
<div className="w-full relative h-[460px] mt-[24px]">
<CustomLoading width="full" height={400}>
<iframe
src={`https://maps.google.com/maps?q=${data.map.latitude},${data.map.longitude}&z=14&output=embed`}
src={`https://maps.google.com/maps?q=${
data?.map?.latitude && data?.map?.longitude
? `${data.map.latitude},${data.map.longitude}`
: encodeURIComponent(data?.location || data?.title || "")
}&z=14&output=embed`}
className="w-full h-full rounded-lg"
loading="lazy"
></iframe>