diff --git a/app/doctor/[slug]/page.js b/app/doctor/[slug]/page.js
index bbb1d5f..fc71ef2 100644
--- a/app/doctor/[slug]/page.js
+++ b/app/doctor/[slug]/page.js
@@ -10,6 +10,7 @@ import { isNoindexDoctor } from "@/lib/entityQuality";
import specialtiesData from "@/data/specialties.json";
import { safeJsonLd } from "@/lib/sanitize";
import { imageUrl, doctorTitle } from "@/helper";
+import { FEATURES } from "@/config/features";
const API_URL = process.env.NEXT_PUBLIC_API_URL;
const FALLBACK_IMG = "/assets/images/og-image.png";
@@ -189,7 +190,9 @@ async function Doctor({ params }) {
url: imageUrl(doctor.img[0].url),
},
}),
- ...(!isUnclaimed && Number(doctor.point) > 0 && {
+ // امتیاز وقتی در صفحه پنهان است نباید در schema بیاید؛ گوگل داده ساختیافتهٔ
+ // نامرئی را نقض راهنما میداند.
+ ...(FEATURES.doctorRatings && !isUnclaimed && Number(doctor.point) > 0 && {
aggregateRating: {
"@type": "AggregateRating",
ratingValue: doctor.point,
diff --git a/components/doctor/detailDoctor/Title.js b/components/doctor/detailDoctor/Title.js
index b5e8841..e7d6778 100644
--- a/components/doctor/detailDoctor/Title.js
+++ b/components/doctor/detailDoctor/Title.js
@@ -11,6 +11,7 @@ import Telegram from "@/components/icons/Telegram";
import Aparat from "@/components/icons/Aparat";
import Youtube from "@/components/icons/Youtube";
import Linkedin from "@/components/icons/Linkedin";
+import { FEATURES } from "@/config/features";
const SOCIAL_ICONS = {
instagram: Instagram,
@@ -22,7 +23,7 @@ const SOCIAL_ICONS = {
function Title({ doctor }) {
const isUnclaimed = doctor?.owner_status !== "claimed";
- const hasRating = Number(doctor?.point) > 0;
+ const hasRating = FEATURES.doctorRatings && Number(doctor?.point) > 0;
return (
diff --git a/components/doctor/detailDoctor/cards/comments/index.js b/components/doctor/detailDoctor/cards/comments/index.js
index 0c31ddb..dc31069 100644
--- a/components/doctor/detailDoctor/cards/comments/index.js
+++ b/components/doctor/detailDoctor/cards/comments/index.js
@@ -3,6 +3,7 @@
import Chart from "./chart";
import Comment from "@/app/component/comment";
import ModalAnswer from "./modal/ModalAnswer";
+import { FEATURES } from "@/config/features";
function Comments({ doctor, comments, rateAggregate }) {
const isUnclaimed = doctor?.owner_status !== "claimed";
@@ -30,7 +31,10 @@ function Comments({ doctor, comments, rateAggregate }) {
) : (
<>
-
+ {/* نمودار امتیاز/رضایت فعلاً پنهان است؛ خودِ نظرات نمایش داده میشود. */}
+ {FEATURES.doctorRatings && (
+
+ )}
>
)}
diff --git a/components/doctor/detailDoctor/index.js b/components/doctor/detailDoctor/index.js
index bc94c31..baa807e 100644
--- a/components/doctor/detailDoctor/index.js
+++ b/components/doctor/detailDoctor/index.js
@@ -4,13 +4,16 @@ import Title from "./Title";
import AboutDcotor from "./cards/AboutDcotor";
import Comments from "./cards/comments";
import Locations from "./cards/locations";
+import { FEATURES } from "@/config/features";
function DetailDoctor({ doctor, comments, rateAggregate, addresses, bookableAddressUuids = [] }) {
return (
-
-
-
+ {FEATURES.doctorShare && (
+
+
+
+ )}
diff --git a/components/doctor/index.js b/components/doctor/index.js
index 7f13cf1..33ce6f5 100644
--- a/components/doctor/index.js
+++ b/components/doctor/index.js
@@ -7,6 +7,7 @@ import CustomLoading from "@/app/component/loading/Custom";
import Faq from "@/components/specialties/detail/Faq";
import specialtiesData from "@/data/specialties.json";
import { doctorTitle } from "@/helper";
+import { FEATURES } from "@/config/features";
// مقصد تمیز صفحهٔ فرود تخصص؛ اگر تخصص slug نداشت، لیست پزشکان با کوئری قدیمی.
const specialtyHref = (name) => {
@@ -35,9 +36,11 @@ function DoctorPage({ doctor, comments, rateAggregate, addresses, bookableAddres
{doctorTitle(doctor?.name)}
-
-
-
+ {FEATURES.doctorShare && (
+
+
+
+ )}