diff --git a/app/component/ItemDoctor.js b/app/component/ItemDoctor.js index 40c7759..129aaac 100644 --- a/app/component/ItemDoctor.js +++ b/app/component/ItemDoctor.js @@ -89,9 +89,7 @@ function ItemDoctor({ doctor, loading, setDoctors }) { : "bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]" }`} > - {doctor?.free_turn - ? `اولین نوبت آزاد: ${doctor?.free_turn}` - : "نوبت ندارد"} + {doctor?.free_turn}

{/* Arrow */} diff --git a/components/doctor/poster/Telefon.js b/components/doctor/poster/Telefon.js index e975ad4..0fb2a56 100644 --- a/components/doctor/poster/Telefon.js +++ b/components/doctor/poster/Telefon.js @@ -2,7 +2,9 @@ import TelefonPoster from "@/components/icons/TelefonPoster"; function Telefon({ data }) { return ( -
+

تلفن:

@@ -10,9 +12,20 @@ function Telefon({ data }) {

{data?.address[0]?.phone}

- {/*

- {data?.address[0]?.phone} - {data?.address[0]?.phone} -

*/} + {data?.address && + data?.address.length > 1 && + data?.address.map( + (item, idx) => + idx !== 0 && ( + + {item?.phone} - + + ) + )}
); } diff --git a/components/doctor/poster/index.js b/components/doctor/poster/index.js index bcc3f7e..37e846c 100644 --- a/components/doctor/poster/index.js +++ b/components/doctor/poster/index.js @@ -8,7 +8,7 @@ import QrImg from "./QrImg"; function Poster({ data }) { return ( -
+
logo diff --git a/components/doctors/index.js b/components/doctors/index.js index 0322007..ffe126f 100644 --- a/components/doctors/index.js +++ b/components/doctors/index.js @@ -11,7 +11,7 @@ import cities from "@/data/city.json"; function DoctorsPage({ matchedCity, matchedState, list }) { const searchParams = useSearchParams(); const [page, setPage] = useState(list?.page?.currentPage); - const [doctors, setDoctors] = useState(list.data); + const [doctors, setDoctors] = useState(list?.data); const fieldName = searchParams.get("specialty"); const findItem = (key, name) => diff --git a/public/assets/images/poster.png b/public/assets/images/poster.png index 304d36c..bfa05cd 100644 Binary files a/public/assets/images/poster.png and b/public/assets/images/poster.png differ diff --git a/services/api.js b/services/api.js index 8356a3f..e40f59b 100644 --- a/services/api.js +++ b/services/api.js @@ -1,4 +1,3 @@ -import { removeToken } from "@/utils"; import axios from "axios"; import Cookies from "js-cookie"; import "react-toastify/dist/ReactToastify.css"; @@ -21,10 +20,10 @@ api.interceptors.response.use( return response.data; }, (error) => { - if (error.status === 401) { - removeToken(); - window.location.pathname = "login"; - } + // if (error.status === 401) { + // removeToken(); + // window.location.pathname = "login"; + // } return Promise.reject(error); } );