refactor: remove FEATURE flags for doctor ratings and sharing in components
This commit is contained in:
@@ -7,6 +7,7 @@ import { getStateInfoClient } from "@/lib/getStateInfoClient";
|
||||
import { doctorTitle } from "@/helper";
|
||||
|
||||
import StarDI from "@/components/icons/StarDI";
|
||||
import { FEATURES } from "@/config/features";
|
||||
|
||||
const ACCENT = "#16528C";
|
||||
const ACCENT_LIGHT = "#2E77C4";
|
||||
@@ -36,8 +37,8 @@ function PosterLight({ data, onQrReady }) {
|
||||
|
||||
const badges = [
|
||||
Number(data?.experience) > 0 && { label: `${data.experience} سال تجربه` },
|
||||
(data?.point ?? 0) > 0 && { icon: <StarDI />, label: `امتیاز ${data.point}` },
|
||||
(data?.satisfaction ?? 0) > 0 && { label: `${data.satisfaction}% رضایت بیماران` },
|
||||
FEATURES.posterRatings && (data?.point ?? 0) > 0 && { icon: <StarDI />, label: `امتیاز ${data.point}` },
|
||||
FEATURES.posterRatings && (data?.satisfaction ?? 0) > 0 && { label: `${data.satisfaction}% رضایت بیماران` },
|
||||
].filter(Boolean);
|
||||
|
||||
return (
|
||||
|
||||
@@ -13,6 +13,7 @@ import TelefonPoster from "@/components/icons/TelefonPoster";
|
||||
import Instagram from "@/components/icons/Instagram";
|
||||
import Telegram from "@/components/icons/Telegram";
|
||||
import Whatsapp from "@/components/icons/Whatsapp";
|
||||
import { FEATURES } from "@/config/features";
|
||||
|
||||
const POSTER_BG =
|
||||
"linear-gradient(160deg, #0B2A4A 0%, #16528C 52%, #2E77C4 100%)";
|
||||
@@ -66,11 +67,11 @@ function Poster({ data, onQrReady }) {
|
||||
icon: <span className="text-[#F6B93B] text-[20px] leading-none">◆</span>,
|
||||
label: `${data.experience} سال تجربه`,
|
||||
},
|
||||
(data?.point ?? 0) > 0 && {
|
||||
FEATURES.posterRatings && (data?.point ?? 0) > 0 && {
|
||||
icon: <StarDI />,
|
||||
label: `امتیاز ${data.point}`,
|
||||
},
|
||||
(data?.satisfaction ?? 0) > 0 && {
|
||||
FEATURES.posterRatings && (data?.satisfaction ?? 0) > 0 && {
|
||||
icon: <span className="text-[#4ADE80] text-[20px] leading-none">♥</span>,
|
||||
label: `${data.satisfaction}% رضایت`,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user