refactor: remove profileLink prop and Link wrapper from ProfessionalCard component.
This commit is contained in:
@@ -16,7 +16,6 @@ interface ProfessionalCardProps {
|
|||||||
imageUrl: string;
|
imageUrl: string;
|
||||||
isVerified: boolean;
|
isVerified: boolean;
|
||||||
rating: number | null;
|
rating: number | null;
|
||||||
profileLink: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ProfessionalCard({
|
function ProfessionalCard({
|
||||||
@@ -28,7 +27,6 @@ function ProfessionalCard({
|
|||||||
imageUrl,
|
imageUrl,
|
||||||
isVerified,
|
isVerified,
|
||||||
rating,
|
rating,
|
||||||
profileLink,
|
|
||||||
}: ProfessionalCardProps) {
|
}: ProfessionalCardProps) {
|
||||||
const starCount = rating ? Math.round(rating) : 0;
|
const starCount = rating ? Math.round(rating) : 0;
|
||||||
const [imgLoaded, setImgLoaded] = useState(false);
|
const [imgLoaded, setImgLoaded] = useState(false);
|
||||||
@@ -37,8 +35,7 @@ function ProfessionalCard({
|
|||||||
const INITIAL_TAG_COUNT = 4;
|
const INITIAL_TAG_COUNT = 4;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={profileLink}>
|
<div className="bg-white rounded-[15px] overflow-hidden shadow-[0px_4px_20px_rgba(0,0,0,0.08)] h-full flex flex-col">
|
||||||
<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">
|
|
||||||
{/* Image */}
|
{/* Image */}
|
||||||
<div className="relative h-[226px] w-full overflow-hidden bg-gray-100">
|
<div className="relative h-[226px] w-full overflow-hidden bg-gray-100">
|
||||||
{!imgLoaded && !isPlaceholder && (
|
{!imgLoaded && !isPlaceholder && (
|
||||||
@@ -149,7 +146,6 @@ function ProfessionalCard({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,7 +423,6 @@ export function TopProfessionals({ content }: { content?: TopProfessionalsConten
|
|||||||
imageUrl={professional.imageUrl}
|
imageUrl={professional.imageUrl}
|
||||||
isVerified={professional.isVerified}
|
isVerified={professional.isVerified}
|
||||||
rating={professional.rating}
|
rating={professional.rating}
|
||||||
profileLink={`/user/profile/${professional.slug}`}
|
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user