refactor: remove profileLink prop and Link wrapper from ProfessionalCard component.

This commit is contained in:
pradeepkumar
2026-03-27 06:56:38 +05:30
parent 317f7e7402
commit 2526bfdb8a

View File

@@ -16,7 +16,6 @@ interface ProfessionalCardProps {
imageUrl: string;
isVerified: boolean;
rating: number | null;
profileLink: string;
}
function ProfessionalCard({
@@ -28,7 +27,6 @@ function ProfessionalCard({
imageUrl,
isVerified,
rating,
profileLink,
}: ProfessionalCardProps) {
const starCount = rating ? Math.round(rating) : 0;
const [imgLoaded, setImgLoaded] = useState(false);
@@ -37,8 +35,7 @@ function ProfessionalCard({
const INITIAL_TAG_COUNT = 4;
return (
<Link href={profileLink}>
<div className="bg-white rounded-[15px] overflow-hidden shadow-[0px_4px_20px_rgba(0,0,0,0.08)] hover:shadow-[0px_6px_24px_rgba(0,0,0,0.12)] transition-shadow cursor-pointer h-full flex flex-col">
<div className="bg-white rounded-[15px] overflow-hidden shadow-[0px_4px_20px_rgba(0,0,0,0.08)] h-full flex flex-col">
{/* Image */}
<div className="relative h-[226px] w-full overflow-hidden bg-gray-100">
{!imgLoaded && !isPlaceholder && (
@@ -149,7 +146,6 @@ function ProfessionalCard({
)}
</div>
</div>
</Link>
);
}
@@ -427,7 +423,6 @@ export function TopProfessionals({ content }: { content?: TopProfessionalsConten
imageUrl={professional.imageUrl}
isVerified={professional.isVerified}
rating={professional.rating}
profileLink={`/user/profile/${professional.slug}`}
/>
))
) : (