refactor: remove FEATURE flags for doctor ratings and sharing in components
This commit is contained in:
@@ -11,7 +11,6 @@ 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,
|
||||
@@ -23,7 +22,7 @@ const SOCIAL_ICONS = {
|
||||
|
||||
function Title({ doctor }) {
|
||||
const isUnclaimed = doctor?.owner_status !== "claimed";
|
||||
const hasRating = FEATURES.doctorRatings && Number(doctor?.point) > 0;
|
||||
const hasRating = Number(doctor?.point) > 0;
|
||||
return (
|
||||
<div className="flex flex-col lg:flex-row items-center justify-start gap-[8px] lg:gap-[32px]">
|
||||
<CircularLoading width={100} height={100}>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
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";
|
||||
@@ -31,10 +30,7 @@ function Comments({ doctor, comments, rateAggregate }) {
|
||||
</p>
|
||||
) : (
|
||||
<>
|
||||
{/* نمودار امتیاز/رضایت فعلاً پنهان است؛ خودِ نظرات نمایش داده میشود. */}
|
||||
{FEATURES.doctorRatings && (
|
||||
<Chart comments={comments} rateAggregate={rateAggregate} />
|
||||
)}
|
||||
<Chart comments={comments} rateAggregate={rateAggregate} />
|
||||
<Comment comments={comments} doctor={doctor} />
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -4,16 +4,13 @@ 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 (
|
||||
<div className="w-full lg:w-[59%]">
|
||||
{FEATURES.doctorShare && (
|
||||
<div className="hidden lg:flex">
|
||||
<Share data={doctor} />
|
||||
</div>
|
||||
)}
|
||||
<div className="hidden lg:flex">
|
||||
<Share data={doctor} />
|
||||
</div>
|
||||
<Title doctor={doctor} />
|
||||
<Link />
|
||||
<AboutDcotor doctor={doctor} />
|
||||
|
||||
Reference in New Issue
Block a user