change api file and design poster
This commit is contained in:
@@ -89,9 +89,7 @@ function ItemDoctor({ doctor, loading, setDoctors }) {
|
|||||||
: "bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]"
|
: "bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{doctor?.free_turn
|
{doctor?.free_turn}
|
||||||
? `اولین نوبت آزاد: ${doctor?.free_turn}`
|
|
||||||
: "نوبت ندارد"}
|
|
||||||
</p>
|
</p>
|
||||||
</CustomLoading>
|
</CustomLoading>
|
||||||
{/* Arrow */}
|
{/* Arrow */}
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ import TelefonPoster from "@/components/icons/TelefonPoster";
|
|||||||
|
|
||||||
function Telefon({ data }) {
|
function Telefon({ data }) {
|
||||||
return (
|
return (
|
||||||
<div className={`flex-col items-start justify-start mt-[40px] ${data?.address[0]?.phone ? 'flex' : 'hidden'}`}>
|
<div
|
||||||
|
className={`flex-col items-start justify-start mt-[40px] ${data?.address[0]?.phone ? "flex" : "hidden"}`}
|
||||||
|
>
|
||||||
<div className="flex items-center justify-start gap-[6px]">
|
<div className="flex items-center justify-start gap-[6px]">
|
||||||
<TelefonPoster />
|
<TelefonPoster />
|
||||||
<p className="text-[#E7EEF6] text-[20px] font-semibold">تلفن:</p>
|
<p className="text-[#E7EEF6] text-[20px] font-semibold">تلفن:</p>
|
||||||
@@ -10,9 +12,20 @@ function Telefon({ data }) {
|
|||||||
<p className="text-[#E7EEF6] text-[16px] font-normal mt-[16px]">
|
<p className="text-[#E7EEF6] text-[16px] font-normal mt-[16px]">
|
||||||
{data?.address[0]?.phone}
|
{data?.address[0]?.phone}
|
||||||
</p>
|
</p>
|
||||||
{/* <p className="text-[#E7EEF6] text-[16px] font-normal mt-[12px]">
|
{data?.address &&
|
||||||
{data?.address[0]?.phone} - {data?.address[0]?.phone}
|
data?.address.length > 1 &&
|
||||||
</p> */}
|
data?.address.map(
|
||||||
|
(item, idx) =>
|
||||||
|
idx !== 0 && (
|
||||||
|
<span
|
||||||
|
key={idx}
|
||||||
|
dir="ltr"
|
||||||
|
className="text-[#E7EEF6] text-[16px] w-fit font-normal mt-[12px] inline"
|
||||||
|
>
|
||||||
|
{item?.phone} -
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import QrImg from "./QrImg";
|
|||||||
|
|
||||||
function Poster({ data }) {
|
function Poster({ data }) {
|
||||||
return (
|
return (
|
||||||
<div className="bg-poster rounded-[16px] overflow-hidden !pt-[32px] p-[24px] relative flex justify-between items-start">
|
<div className="bg-poster overflow-hidden !pt-[32px] p-[24px] relative flex justify-between items-start">
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-start gap-[5px]">
|
<div className="flex items-center justify-start gap-[5px]">
|
||||||
<Image src={Logo} width={30} height={30} alt="logo" />
|
<Image src={Logo} width={30} height={30} alt="logo" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import cities from "@/data/city.json";
|
|||||||
function DoctorsPage({ matchedCity, matchedState, list }) {
|
function DoctorsPage({ matchedCity, matchedState, list }) {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const [page, setPage] = useState(list?.page?.currentPage);
|
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 fieldName = searchParams.get("specialty");
|
||||||
|
|
||||||
const findItem = (key, name) =>
|
const findItem = (key, name) =>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 852 KiB After Width: | Height: | Size: 162 KiB |
+4
-5
@@ -1,4 +1,3 @@
|
|||||||
import { removeToken } from "@/utils";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
@@ -21,10 +20,10 @@ api.interceptors.response.use(
|
|||||||
return response.data;
|
return response.data;
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
if (error.status === 401) {
|
// if (error.status === 401) {
|
||||||
removeToken();
|
// removeToken();
|
||||||
window.location.pathname = "login";
|
// window.location.pathname = "login";
|
||||||
}
|
// }
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user