last update

This commit is contained in:
Ehsan
2025-05-15 21:11:32 +03:30
parent 60fe4c8040
commit 328e11c21c
8 changed files with 56 additions and 43 deletions
+1 -1
View File
@@ -18,9 +18,9 @@ function DoctorsPage({ params, matchedCity, matchedState }) {
const [data, setData] = useState({
expertise: "",
turn: true,
gender: 0,
degree: 0,
turn: true,
});
useEffect(() => {
+3
View File
@@ -2,6 +2,7 @@ import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
import RadioContent from "./RadioContent";
import { Switch } from "@mui/material";
import { category, expertise } from "./listSelector";
import specialties from "@/data/specialties.json";
const group1 = ["خانم", "آقا", "هر دو"];
const group2 = ["فوق تخصص", "دکترای تخصصی", "متخصص", "دکتری"];
@@ -11,6 +12,8 @@ function Content({ data, setData }) {
const changeData = (value, name) => {
setData({ ...data, [name]: value });
};
const parentList = specialties.map(item => !item.parent);
const childrenList = specialties.map(item => item.parent);
return (
<div className="mt-[50px] px-[0px] md:px-[19px] lg:px-[38px] mb-[32px]">
+11 -16
View File
@@ -11,16 +11,14 @@ const listSort = [
];
function SelectSort() {
const [sort, setSort] = useState(3);
const [sort, setSort] = useState("");
const handleChange = (event) => setSort(event.target.value);
console.log(sort);
return (
<Select
defaultValue={sort}
displayEmpty
defaultValue={sort}
onChange={handleChange}
className="!w-[198px] !max-w-[305px] lg:!w-full text-[14px] md:text-[16px] !bg-transparent lg:!bg-[#FFF] !h-[44px] sm:!h-[50px] md:!h-[57px] lg:!h-[64px]"
renderValue={(value) => {
@@ -29,14 +27,15 @@ function SelectSort() {
<SvgIcon color="primary">
<SortD />
</SvgIcon>
<ul className="flex items-center justify-start gap-1">
{Array(sort).fill({}).map((_, idx) => (
<li key={idx}>
<StarDI />
</li>
))}
</ul>
{/* {value || "مرتب سازی"} */}
{value ? (
<ul className="flex items-center justify-start gap-1">
{Array(sort).fill({}).map((_, idx) => (
<li key={idx}>
<StarDI />
</li>
))}
</ul>
) : "مرتب سازی"}
</div>
);
}}
@@ -62,14 +61,10 @@ function SelectSort() {
className="!flex !flex-col !items-start !w-full hover:!bg-transparent"
>
<div value={item.id} className="!p-2 !mr-2 !w-[calc(100%_-_16px)] flex items-center justify-start">
{/* {item.label} */}
{Array(item.label).fill({}).map((_, idx) => (
<StarDI key={idx} />
))}
</div>
{/* {listSort.length > idx + 1 && (
<span className="block mr-2 w-[calc(100%_-_16px)] h-px bg-[#EFEFEF]"></span>
)} */}
</MenuItem>
))}
</Select>