diff --git a/app/component/comment/index.js b/app/component/comment/index.js index 373e4ba..59e4def 100644 --- a/app/component/comment/index.js +++ b/app/component/comment/index.js @@ -11,8 +11,7 @@ function Comment({ comments }) { false && "w-full" }`} > - {comments && - comments.length && + {comments?.length > 0 && comments.map((item, idx) => ( s.name).join(" و ") || ""; @@ -49,7 +49,7 @@ async function Doctor({ params }) { try { const resDoctor = await axiosInstance.get(`${API_URL}/api/v1/doctor/${slug}`); - doctor = resDoctor.data; + doctor = resDoctor.data?.data?.data; if (doctor) { const resComments = await axiosInstance.get( `${API_URL}/api/v1/clinicpro/comments/${doctor.id}` diff --git a/components/doctor/detailDoctor/cards/AboutDcotor.js b/components/doctor/detailDoctor/cards/AboutDcotor.js index ccb2a53..917ca0c 100644 --- a/components/doctor/detailDoctor/cards/AboutDcotor.js +++ b/components/doctor/detailDoctor/cards/AboutDcotor.js @@ -39,23 +39,25 @@ function AboutDcotor({ doctor }) { -
-

- خدمات -

- -
+ {doctor?.expertise?.length > 0 && ( +
+

+ خدمات +

+ +
+ )} ); } diff --git a/components/doctor/detailDoctor/cards/locations/Item.js b/components/doctor/detailDoctor/cards/locations/Item.js index d19a7f5..715e9b8 100644 --- a/components/doctor/detailDoctor/cards/locations/Item.js +++ b/components/doctor/detailDoctor/cards/locations/Item.js @@ -49,6 +49,35 @@ function Item({ data }) {

تلفن: {data.telephone}

+ {data?.map?.latitude && data?.map?.longitude && ( + + + + )} + + + {data?.map?.latitude && data?.map?.longitude && ( +
+ +
- -
- - - - - -
+ )} );