change api file and design poster

This commit is contained in:
ehsan
2025-10-04 20:36:50 +03:30
parent 83e482507b
commit 0b90e1abc4
6 changed files with 24 additions and 14 deletions
+1 -3
View File
@@ -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}
</p>
</CustomLoading>
{/* Arrow */}
+17 -4
View File
@@ -2,7 +2,9 @@ import TelefonPoster from "@/components/icons/TelefonPoster";
function Telefon({ data }) {
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]">
<TelefonPoster />
<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]">
{data?.address[0]?.phone}
</p>
{/* <p className="text-[#E7EEF6] text-[16px] font-normal mt-[12px]">
{data?.address[0]?.phone} - {data?.address[0]?.phone}
</p> */}
{data?.address &&
data?.address.length > 1 &&
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>
);
}
+1 -1
View File
@@ -8,7 +8,7 @@ import QrImg from "./QrImg";
function Poster({ data }) {
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 className="flex items-center justify-start gap-[5px]">
<Image src={Logo} width={30} height={30} alt="logo" />
+1 -1
View File
@@ -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) =>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 KiB

After

Width:  |  Height:  |  Size: 162 KiB

+4 -5
View File
@@ -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);
}
);