feat: enhance doctor and clinic components with doctorTitle helper and improve rendering logic

This commit is contained in:
hamed
2026-07-19 16:17:24 +03:30
parent 4c8377f439
commit e8a7bdf2fc
8 changed files with 54 additions and 20 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import Share from "./detailDoctor/Share";
import CustomLoading from "@/app/component/loading/Custom";
import Faq from "@/components/specialties/detail/Faq";
import specialtiesData from "@/data/specialties.json";
import { doctorTitle } from "@/helper";
// مقصد تمیز صفحهٔ فرود تخصص؛ اگر تخصص slug نداشت، لیست پزشکان با کوئری قدیمی.
const specialtyHref = (name) => {
@@ -31,7 +32,7 @@ function DoctorPage({ doctor, comments, rateAggregate, addresses, bookableAddres
</span>
))}
</h2>
<p className="text-[#525252] text-nowrap mr-1">{doctor?.name}</p>
<p className="text-[#525252] text-nowrap mr-1">{doctorTitle(doctor?.name)}</p>
</div>
</CustomLoading>
<div className="flex lg:hidden">