feat: add feature toggles for doctor share and ratings functionality

This commit is contained in:
hamed
2026-07-30 09:05:45 +03:30
parent eb83762016
commit e87a0bae9b
6 changed files with 37 additions and 9 deletions
+4 -1
View File
@@ -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,