From eb1755c22d201742a0adb71147ad45f37effbc10 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Fri, 8 May 2026 18:40:41 +0530 Subject: [PATCH] style: increase image container heights and adjust focal points for better portrait photo alignment --- src/components/home/FeaturesSection.tsx | 4 ++-- src/components/home/TopProfessionals.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/home/FeaturesSection.tsx b/src/components/home/FeaturesSection.tsx index a789c16..e783955 100644 --- a/src/components/home/FeaturesSection.tsx +++ b/src/components/home/FeaturesSection.tsx @@ -24,13 +24,13 @@ function AgentCard({ agent, className = '' }: { agent: FeaturedAgentItem; classN const cardInner = (
-
+
{imgSrc && ( { if (el?.complete && el.naturalWidth > 0) setImgLoaded(true); }} src={imgSrc} alt={agent.name} - className={`w-full h-full object-cover transition-opacity duration-300 ${imgLoaded ? 'opacity-100' : 'opacity-0'}`} + className={`w-full h-full object-cover object-[center_30%] transition-opacity duration-300 ${imgLoaded ? 'opacity-100' : 'opacity-0'}`} onLoad={() => setImgLoaded(true)} onError={() => setImgLoaded(true)} /> diff --git a/src/components/home/TopProfessionals.tsx b/src/components/home/TopProfessionals.tsx index 5c3f713..36078c7 100644 --- a/src/components/home/TopProfessionals.tsx +++ b/src/components/home/TopProfessionals.tsx @@ -76,8 +76,9 @@ function ProfessionalCard({ return (
- {/* Image */} -
+ {/* Image — taller box + top-biased focal point so portrait photos + don't crop faces off the top. */} +
{/* Shimmer while loading, initials only on error */} {imgError || isPlaceholder ? (
@@ -91,7 +92,7 @@ function ProfessionalCard({ src={imageUrl} alt={name} fill - className={`object-cover transition-opacity duration-300 ${imgLoaded ? 'opacity-100' : 'opacity-0'}`} + className={`object-cover object-[center_30%] transition-opacity duration-300 ${imgLoaded ? 'opacity-100' : 'opacity-0'}`} onLoad={() => setImgLoaded(true)} onError={() => setImgError(true)} /> @@ -345,7 +346,7 @@ export function TopProfessionals({ content }: { content?: TopProfessionalsConten <> {[1, 2, 3].map((i) => (
-
+