feat: Enhance specialty handling and navigation across doctor and specialty pages
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import Pageguide from "@/app/component/Pageguide";
|
||||
import { parentSpecialty } from "@/lib/specialtyIndexing";
|
||||
import DoctorGrid from "./DoctorGrid";
|
||||
import Faq from "./Faq";
|
||||
import SpecialtyTree from "./SpecialtyTree";
|
||||
|
||||
// چیدمان عمداً همخانوادهٔ /doctors است: همان padding-responsive، همان فاصلهٔ بالای صفحه،
|
||||
// همان تایپوگرافی عنوان و همان گرید کارت پزشک — کاربر نباید حس کند وارد بخش دیگری شده.
|
||||
function SpecialtyDetailPage({ specialtyName, cityName, doctors, intro, faq, origin, slug }) {
|
||||
function SpecialtyDetailPage({ specialty, specialtyName, cityName, doctors, intro, faq, origin, slug }) {
|
||||
const parent = parentSpecialty(specialty);
|
||||
|
||||
return (
|
||||
<div className="pt-[95px] sm:pt-[120px] padding-responsive">
|
||||
<Pageguide
|
||||
@@ -12,6 +16,10 @@ function SpecialtyDetailPage({ specialtyName, cityName, doctors, intro, faq, ori
|
||||
list={[
|
||||
{ name: "خانه", href: "/" },
|
||||
{ name: "تخصصها", href: "/specialties" },
|
||||
// زیرتخصص از دل گروهش میآید؛ بدون این حلقه، مسیر بازگشت به گروه فقط
|
||||
// دستکاری URL بود. Pageguide همین فهرست را به BreadcrumbList هم میدهد،
|
||||
// پس نسخهٔ بصری و schema واگرا نمیشوند.
|
||||
...(parent ? [{ name: parent.name, href: `/specialties/${parent.slug}` }] : []),
|
||||
// href صفحهٔ جاری: بدون آن `item` غایب میشود و اسکیما نامعتبر است
|
||||
{ name: specialtyName, href: slug ? `/specialties/${slug}` : "/specialties" },
|
||||
]}
|
||||
@@ -21,6 +29,8 @@ function SpecialtyDetailPage({ specialtyName, cityName, doctors, intro, faq, ori
|
||||
متخصص {specialtyName} در {cityName}
|
||||
</h1>
|
||||
|
||||
<SpecialtyTree specialty={specialty} />
|
||||
|
||||
<p className="text-[#525252] text-[14px] md:text-[16px] font-normal leading-8 mt-[16px] text-justify">
|
||||
{intro}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user