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:
@@ -1,5 +1,6 @@
|
||||
import { frequentSearches } from "@/constans";
|
||||
import { Button } from "@mui/material";
|
||||
import Link from "next/link";
|
||||
|
||||
function FrequentSearches() {
|
||||
return (
|
||||
@@ -10,16 +11,23 @@ function FrequentSearches() {
|
||||
<div className="overflow-auto hidden-scroll flex justify-start">
|
||||
<ul className="flex items-center justify-start gap-[14px] pl-[14px]">
|
||||
{frequentSearches.map((item, idx) => (
|
||||
<li key={idx}>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
className="!py-[6px] md:!py-[7px] lg:!py-[8px] !px-[12px] sm:!px-[14px] md:!px-[15px] lg:!px-[16px] !text-[12px] lg:!text-[14px]
|
||||
!rounded-[4px] !shadow-none !font-normal !border !border-solid !border-[#D7D7D7] hover:!bg-[#EFEFEF]"
|
||||
>
|
||||
{item}
|
||||
</Button>
|
||||
</li>
|
||||
<Link href={{
|
||||
pathname: "/doctors",
|
||||
query: {
|
||||
search: item
|
||||
},
|
||||
}}>
|
||||
<li key={idx}>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
className="!py-[6px] md:!py-[7px] lg:!py-[8px] !px-[12px] sm:!px-[14px] md:!px-[15px] lg:!px-[16px] !text-[12px] lg:!text-[14px]
|
||||
!rounded-[4px] !shadow-none !font-normal !border !border-solid !border-[#D7D7D7] hover:!bg-[#EFEFEF]"
|
||||
>
|
||||
{item}
|
||||
</Button>
|
||||
</li>
|
||||
</Link>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -7,17 +7,17 @@ function TextHeader() {
|
||||
|
||||
return (
|
||||
<div className="z-[50]">
|
||||
<p className="text-[#F17732] text-center font-kalame text-[20px] sm:text-[24px] md:text-[28px] lg:text-[32px] font-bold">
|
||||
<h1 className="text-[#F17732] text-center font-kalame text-[20px] sm:text-[24px] md:text-[28px] lg:text-[32px] font-bold">
|
||||
با {matchedCity?.site_name}
|
||||
</p>
|
||||
<p
|
||||
</h1>
|
||||
<h2
|
||||
className="text-[#525252] text-center mt-2.5 font-kalame text-[16px] sm:text-[25px] md:text-[31px] lg:text-[36px]
|
||||
font-bold flex items-center gap-1 sm:gap-2"
|
||||
>
|
||||
<BText />
|
||||
{matchedCity?.slogan}
|
||||
<AText />
|
||||
</p>
|
||||
</h2>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user