- idx + 1
- ? "text-[#9B9B9B]"
- : "text-[#525252]"
- }
+ ${list.length > idx + 1
+ ? "text-[#9B9B9B]"
+ : "text-[#525252]"
+ }
`}
>
{item}
-
+
-
+
{title}
-
+
{detail}
diff --git a/app/doctors/page.js b/app/doctors/page.js
index 0fe2b5e..32b5e88 100644
--- a/app/doctors/page.js
+++ b/app/doctors/page.js
@@ -1,10 +1,17 @@
import DoctorsPage from "@/components/doctors";
import Layout from "@/components/layout/StLayout";
+import { getStateInfo } from "@/lib/getStateInfo";
+
+function Doctors({ searchParams }) {
+ const { matchedCity, matchedState } = getStateInfo();
-function Doctors() {
return (
-
+
);
}
diff --git a/app/globals.css b/app/globals.css
index 1e3fa5f..dd38044 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -235,7 +235,7 @@ html {
}
.MuiFormControl-root .MuiInputBase-root .MuiInputBase-input {
- font-size: 16px !important;
+ font-size: 10px !important;
}
@keyframes openx {
@@ -384,7 +384,7 @@ html {
}
.MuiFormControl-root .MuiInputBase-root .MuiInputBase-input {
- font-size: 16px !important;
+ font-size: 13px !important;
}
.MuiModal-root .MuiBox-root {
diff --git a/components/aboutUs/Head.js b/components/aboutUs/Head.js
index 5c57d27..2541049 100644
--- a/components/aboutUs/Head.js
+++ b/components/aboutUs/Head.js
@@ -13,9 +13,9 @@ function Head() {
width={46}
alt="logo"
/>
-
+
درباره {matchedCity?.site_name}
-
+
);
}
diff --git a/components/aboutUs/index.js b/components/aboutUs/index.js
index 4f799e7..b696551 100644
--- a/components/aboutUs/index.js
+++ b/components/aboutUs/index.js
@@ -10,7 +10,7 @@ function AboutUsPage() {
"
>
-
+
روش های خانگی محافظت از پوست در تابستان
-
+
diff --git a/components/blog/relatedContent/Item.js b/components/blog/relatedContent/Item.js
index 977753d..a132d31 100644
--- a/components/blog/relatedContent/Item.js
+++ b/components/blog/relatedContent/Item.js
@@ -25,9 +25,9 @@ function Item({ data, idx, loading }) {
-
+
{data.title}
-
+
diff --git a/components/blogs/latestArticles/Article.js b/components/blogs/latestArticles/Article.js
index 6fb2ffe..1126a7e 100644
--- a/components/blogs/latestArticles/Article.js
+++ b/components/blogs/latestArticles/Article.js
@@ -21,9 +21,9 @@ function Article({ data, loading }) {
diff --git a/components/booking/location/Head.js b/components/booking/location/Head.js
index b59ce20..3c4a12b 100644
--- a/components/booking/location/Head.js
+++ b/components/booking/location/Head.js
@@ -14,12 +14,12 @@ function Head({ doctor }) {
width={56}
/>
-
+
{doctor.name}
-
-
+
+
تخصص: {doctor.expertise}
-
+
);
diff --git a/components/clinic/components/about/ContentDetail.js b/components/clinic/components/about/ContentDetail.js
index ff2da2e..a4807b0 100644
--- a/components/clinic/components/about/ContentDetail.js
+++ b/components/clinic/components/about/ContentDetail.js
@@ -5,7 +5,7 @@ function ContentDetail({ head, children, loading }) {
return (
- {head}
+ {head}
{children}
diff --git a/components/clinic/components/about/ListBime.js b/components/clinic/components/about/ListBime.js
index b0e2ecf..2de5bfa 100644
--- a/components/clinic/components/about/ListBime.js
+++ b/components/clinic/components/about/ListBime.js
@@ -34,9 +34,9 @@ function ListBime({ data, loading }) {
className="p-[16px] min-w-[156px] w-full border border-[#EFEFEF] flex flex-col items-center justify-center gap-[20px]"
>
-
+
{item.name}
-
+
))}
diff --git a/components/clinic/components/about/Services.js b/components/clinic/components/about/Services.js
index 6ac5d8a..49a4672 100644
--- a/components/clinic/components/about/Services.js
+++ b/components/clinic/components/about/Services.js
@@ -15,14 +15,14 @@ function Services({ data, loading }) {
-
{item}
-
+
))}
diff --git a/components/clinic/components/about/Specialties.js b/components/clinic/components/about/Specialties.js
index f8a00de..a478843 100644
--- a/components/clinic/components/about/Specialties.js
+++ b/components/clinic/components/about/Specialties.js
@@ -15,14 +15,14 @@ function Specialties({ data, loading }) {
diff --git a/components/doctor/detailDoctor/Title.js b/components/doctor/detailDoctor/Title.js
index 3620a56..7d888a3 100644
--- a/components/doctor/detailDoctor/Title.js
+++ b/components/doctor/detailDoctor/Title.js
@@ -23,14 +23,14 @@ function Title({ doctor, loading }) {
-
+
{doctor.name}
-
+
-
+
تخصص: {doctor.expertise}
-
+
diff --git a/components/doctor/detailDoctor/cards/AboutDcotor.js b/components/doctor/detailDoctor/cards/AboutDcotor.js
index 7cbb569..2973a9d 100644
--- a/components/doctor/detailDoctor/cards/AboutDcotor.js
+++ b/components/doctor/detailDoctor/cards/AboutDcotor.js
@@ -21,11 +21,10 @@ function AboutDcotor({ doctor, loading }) {
text-[#616161] text-[14px] font-normal overflow-hidden relative
md:max-h-fit after:absolute after:right-0 after:bottom-0 leading-[28px] sm:leading-[30px] md:leading-[32px] lg:leading-[33px] after:h-[80px]
after:shadow-xl after:w-full transition-all duration-500 md:after:!bg-[linear-gradient(transparent,transparent)]
- ${
- isMore
- ? "after:bg-transparent max-h-screen"
- : "after:bg-[linear-gradient(transparent,#FAFAFA)] max-h-[200px]"
- }
+ ${isMore
+ ? "after:bg-transparent max-h-screen"
+ : "after:bg-[linear-gradient(transparent,#FAFAFA)] max-h-[200px]"
+ }
`}
>
{doctor.detail}
@@ -48,9 +47,9 @@ function AboutDcotor({ doctor, loading }) {
-
+
{item}
-
+
))}
diff --git a/components/doctor/detailDoctor/cards/comments/chart/ProgressAll.js b/components/doctor/detailDoctor/cards/comments/chart/ProgressAll.js
index 83267cd..1a5e560 100644
--- a/components/doctor/detailDoctor/cards/comments/chart/ProgressAll.js
+++ b/components/doctor/detailDoctor/cards/comments/chart/ProgressAll.js
@@ -27,7 +27,7 @@ function ProgressAll({ doctor, loading }) {
رضایت کاربران
- {numberToArStyle(doctor.total_user_satisfaction)}%
+ {numberToArStyle(doctor.total_user_satisfaction)}%
diff --git a/components/doctor/index.js b/components/doctor/index.js
index 836f7ea..5c5ba3a 100644
--- a/components/doctor/index.js
+++ b/components/doctor/index.js
@@ -20,9 +20,9 @@ function DoctorPage({ doctor }) {
-
+
متخصص {doctor.expertise} {" >"}
-
+
{doctor.name}
diff --git a/components/doctors/index.js b/components/doctors/index.js
index 828230c..8e81805 100644
--- a/components/doctors/index.js
+++ b/components/doctors/index.js
@@ -14,15 +14,13 @@ import { Button } from "@mui/material";
import citiesData from "@/data/city.json";
import statesData from "@/data/state.json";
-function DoctorsPage() {
+function DoctorsPage({ params, matchedCity, matchedState }) {
const [loading, setLoading] = useState(true);
const [open, setOpen] = useState(false);
const { isProvinceInclude } = useProvince();
const [selected, setSelected] = useState({
- // province: isProvinceInclude?.name || locationSelected.province,
- // city: locationSelected.city || newCity,
- province: isProvinceInclude?.name,
- city: null,
+ province: matchedState?.name,
+ city: matchedCity?.name,
});
const searchParams = useSearchParams();
const locationSelected = {
@@ -65,16 +63,16 @@ function DoctorsPage() {
onClick={() => setOpen(true)}
>
-
+
{" "}
{selected.province || "استان"}
{" / "}
{selected.city || "شهر"}
-
+
-
+
diff --git a/components/doctors/search/index.js b/components/doctors/search/index.js
index 18a9797..9302732 100644
--- a/components/doctors/search/index.js
+++ b/components/doctors/search/index.js
@@ -4,7 +4,7 @@ import ArrowBottomD from "@/components/icons/ArrowBottomD";
import SearchD from "@/components/icons/SearchD";
import FilterModal from "../modal/FilterModal";
-function SearchBar({ data, setData }) {
+function SearchBar({ data, setData, params }) {
return (
{frequentSearches.map((item, idx) => (
-
-
- {item}
-
-
+
+
+
+ {item}
+
+
+
))}
diff --git a/components/home/TextHeader.js b/components/home/TextHeader.js
index ca75aa3..fc77290 100644
--- a/components/home/TextHeader.js
+++ b/components/home/TextHeader.js
@@ -7,17 +7,17 @@ function TextHeader() {
return (
diff --git a/components/panel/addDoctor/index.js b/components/panel/addDoctor/index.js
index f643d2b..c90e51f 100644
--- a/components/panel/addDoctor/index.js
+++ b/components/panel/addDoctor/index.js
@@ -102,9 +102,9 @@ function AddDoctorPage() {
return (
-
+
پروفایل من
-
+
-
- {isSendMsg ? (
-
- ) : (
-
- )}
-
-
+
);
}
diff --git a/components/register/LayoutRegister.js b/components/register/LayoutRegister.js
new file mode 100644
index 0000000..8e24525
--- /dev/null
+++ b/components/register/LayoutRegister.js
@@ -0,0 +1,44 @@
+import Image from "next/image";
+import Link from "next/link";
+
+const about = ["سوالات متداول", "تماس با ما", "درباره ما"];
+
+function LayoutRegister({ children, matchedCity }) {
+ return (
+
+
+
+
+
{matchedCity?.site_name || "نوبت ۷۲۴"}
+
+
+ {children}
+
+
+
+ {about.map((item, idx) => (
+
+
+ {item}
+
+
+ ))}
+
+
+
+ )
+}
+
+export default LayoutRegister
\ No newline at end of file
diff --git a/components/register/LogInPage.js b/components/register/LogInPage.js
index 53e816e..d095cbe 100644
--- a/components/register/LogInPage.js
+++ b/components/register/LogInPage.js
@@ -4,13 +4,15 @@ import { Button, InputAdornment } from "@mui/material";
import Link from "next/link";
import { useState } from "react";
-function LogInPage({ setIsSendMsg, setStep }) {
+function LogInPage({ setIsSendMsg, setStep, matchedCity }) {
const [num, setNum] = useState("");
const [error, setError] = useState({ valid: true, text: '' });
+
const handleChange = (val) => {
- !error.valid && setError({ ...error, valid: true });
const formatted = formatPhoneNumber(val);
+ const checkedNum = validatePhoneNumber(formatted);
+ setError(checkedNum);
setNum(formatted);
};
@@ -20,7 +22,7 @@ function LogInPage({ setIsSendMsg, setStep }) {
p-0 border-transparent sm:p-[40px] sm:pb-[48px] w-full sm:w-fit sm:min-w-[425px]"
>
- ورود یا ثبت نام در نوبت 724
+ ورود یا ثبت نام در {matchedCity?.site_name || "نوبت 724"}
شماره همراه خود را وارد نمایید.
@@ -76,7 +78,7 @@ function LogInPage({ setIsSendMsg, setStep }) {
قوانین استفاده
{" "}
- از نوبت 724 را می پذیرم.
+ از {matchedCity?.site_name || 'نوبت 724'} را می پذیرم.
);
diff --git a/components/register/index.js b/components/register/index.js
index 1a4b61c..bf10451 100644
--- a/components/register/index.js
+++ b/components/register/index.js
@@ -1,43 +1,21 @@
-import Image from "next/image";
-import Link from "next/link";
+"use client";
-const about = ["سوالات متداول", "تماس با ما", "درباره ما"];
+import SetCodePage from "@/components/register/SetCodePage";
+import LogInPage from "@/components/register/LogInPage";
+import { useState } from "react";
+import LayoutRegister from "./LayoutRegister";
+
+function RegisterPage({ matchedCity }) {
+ const [isSendMsg, setIsSendMsg] = useState(false);
-function RegisterPage({ children }) {
return (
-
-
-
-
- {children}
-
-
-
- {about.map((item, idx) => (
-
-
- {item}
-
-
- ))}
-
-
-
+
+ {isSendMsg ? (
+
+ ) : (
+
+ )}
+
);
}
diff --git a/components/specialties/list/ItemSpecialties.js b/components/specialties/list/ItemSpecialties.js
index 4bf33fc..57ca669 100644
--- a/components/specialties/list/ItemSpecialties.js
+++ b/components/specialties/list/ItemSpecialties.js
@@ -16,7 +16,7 @@ function ItemSpecialties({ data, loading }) {
hover:bg-[#5559CE] transition-all duration-500 cursor-pointer hover-mode-item-speciality"
>
- {data.name}
+ {data.name}
diff --git a/components/specialties/list/index.js b/components/specialties/list/index.js
index 6b02632..f1b4040 100644
--- a/components/specialties/list/index.js
+++ b/components/specialties/list/index.js
@@ -7,9 +7,9 @@ function List({ loading, specialties = [] }) {
{specialties.length === 0 ? (
diff --git a/helper/index.js b/helper/index.js
index 9414033..bbfe597 100644
--- a/helper/index.js
+++ b/helper/index.js
@@ -123,5 +123,10 @@ export function validatePhoneNumber(input) {
return { valid: false, text: 'شماره موبایل باید دقیقا 11 رقم باشد.' };
}
+ const isValid = /^9\d{8}$/.test(digits);
+ if (!isValid) {
+ return { valid: false, text: 'شماره موبایل نامعتبر است.' };
+ }
+
return { valid: true, text: null };
}