feat(doctor profile): implement unclaimed doctor handling and UI adjustments

This commit is contained in:
hamed
2026-07-12 10:00:03 +03:30
parent ce05e464c4
commit 42ac6645d5
5 changed files with 195 additions and 25 deletions
@@ -5,6 +5,10 @@ import Comment from "@/app/component/comment";
import ModalAnswer from "./modal/ModalAnswer";
function Comments({ doctor, comments, rateAggregate }) {
const isUnclaimed = doctor?.owner_status !== "claimed";
const hasComments = comments?.length > 0;
const hideRatingBlock = isUnclaimed && !hasComments;
return (
<div className="mt-[24px] sm:mt-[27px] md:mt-[29px] lg:mt-[32px]">
<a
@@ -20,8 +24,16 @@ function Comments({ doctor, comments, rateAggregate }) {
</p>
<ModalAnswer doctor={doctor} />
</div>
<Chart comments={comments} rateAggregate={rateAggregate} />
<Comment comments={comments} doctor={doctor} />
{hideRatingBlock ? (
<p className="mt-[16px] text-[#616161] text-[14px] md:text-[16px] font-normal">
هنوز نظری برای این پزشک ثبت نشده است.
</p>
) : (
<>
<Chart comments={comments} rateAggregate={rateAggregate} />
<Comment comments={comments} doctor={doctor} />
</>
)}
</div>
);
}