31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
import DoctorAvatar from "@/app/component/DoctorAvatar";
|
|
|
|
function Head({ doctor }) {
|
|
// تبدیل specialties array به string
|
|
const expertiseText = doctor?.specialties
|
|
?.map((exp) => exp.name)
|
|
.join("، ") || "";
|
|
|
|
return (
|
|
<div
|
|
className=" flex items-center justify-start gap-[8px] sm:gap-[11px] md:gap-[14px] lg:gap-[16px] mt-[8px] sm:mt-[13px] md:mt-[19px] lg:mt-[24px] mb-[12px] sm:mb-[19px] md:mb-[25px] lg:lg:mb-[32px] "
|
|
>
|
|
<DoctorAvatar
|
|
doctor={doctor}
|
|
size={95}
|
|
className=" w-[40px] sm:w-[58px] md:w-[77px] lg:w-[95px] h-[40px] sm:h-[58px] md:h-[77px] lg:h-[95px] "
|
|
/>
|
|
<div className="flex flex-col items-start justify-center gap-[8px] sm:gap-[12px] md:gap-[16px] lg:gap-[20px]">
|
|
<p className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
|
|
{doctor?.name}
|
|
</p>
|
|
<p className="text-[#616161] text-[14px] md:text-[16px] font-medium">
|
|
تخصص: {expertiseText}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Head;
|