change name in register & add link to most-searched home page & change tag & change design and responsive & fix active link header & must include field num in register & send code msg

This commit is contained in:
Ehsan
2025-05-13 22:07:03 +03:30
parent cd3114d308
commit a8a320465d
37 changed files with 192 additions and 172 deletions
+22
View File
@@ -7,6 +7,7 @@ import ModalSearchCity from "@/app/component/modalSearchCity";
import Search from "@/components/icons/Search";
import ButtonFilter from "@/app/component/modalSearchCity/ButtonFilter";
import Link from "next/link";
import SearchD from "@/components/icons/SearchD";
function Fields({ city, state }) {
const [open, setOpen] = useState(false);
@@ -43,6 +44,15 @@ function Fields({ city, state }) {
"& .MuiInputBase-input": {
color: "#6C757D",
},
"& .MuiInputBase-input": {
color: "#6C757D",
fontSize: {
xs: "10px !important",
sm: "12px !important",
md: "14px !important",
lg: "16px !important",
},
}
}}
placeholder="جستجوی نام پزشک، تخصص، بیماری ..."
dir="rtl"
@@ -63,6 +73,18 @@ function Fields({ city, state }) {
</div>
<p>جستجو</p>
</Button>
<Button
className="!flex lg:!hidden !rounded-[4px]
!w-[40px] sm:!w-[42px] md:!w-[45px] lg:!w-[48px]
!h-[40px] sm:!h-[42px] md:!h-[45px] lg:!h-[48px]
!min-w-[40px] sm:!min-w-[42px] md:!min-w-[45px] lg:!min-w-[48px]
!min-h-[40px] sm:!min-h-[42px] md:!min-h-[45px] lg:!min-h-[48px]
!gap-2.5 !p-2.5"
>
<div className="w-[24px] h-[24px] min-w-[24px] min-h-[24px]">
<SearchD />
</div>
</Button>
</Link>
</>
)
-31
View File
@@ -1,30 +1,11 @@
import { Button, ButtonGroup, TextField } from "@mui/material";
import SearchD from "@/components/icons/SearchD";
import Link from "next/link";
import statesData from "@/data/state.json";
import citiesData from "@/data/city.json";
import Fields from "./Fields";
import { getStateInfo } from "@/lib/getStateInfo";
// const provinceIdMap = Object.fromEntries(
// statesData.map((state) => [state.name, state.id])
// );
// const citiesByProvinceId = citiesData.reduce((acc, city) => {
// if (!acc[city.province_id]) acc[city.province_id] = [];
// acc[city.province_id].push(city);
// return acc;
// }, {});
function SearchBar() {
const { matchedCity, matchedState } = getStateInfo()
// const getDefaultCityForProvince = useCallback((provinceName) => {
// if (!provinceName) return undefined;
// const provinceId = provinceIdMap[provinceName];
// return citiesByProvinceId[provinceId]?.[0]?.name;
// }, []);
return (
<ButtonGroup
variant="contained"
@@ -35,18 +16,6 @@ function SearchBar() {
"
>
<Fields city={matchedCity} state={matchedState} />
<Button
className="!flex lg:!hidden !rounded-[4px]
!w-[40px] sm:!w-[42px] md:!w-[45px] lg:!w-[48px]
!h-[40px] sm:!h-[42px] md:!h-[45px] lg:!h-[48px]
!min-w-[40px] sm:!min-w-[42px] md:!min-w-[45px] lg:!min-w-[48px]
!min-h-[40px] sm:!min-h-[42px] md:!min-h-[45px] lg:!min-h-[48px]
!gap-2.5 !p-2.5"
>
<div className="w-[24px] h-[24px] min-w-[24px] min-h-[24px]">
<SearchD />
</div>
</Button>
</ButtonGroup>
);
}