"use client"; import { useEffect, useState } from "react"; import SearchBar from "./search"; import SortList from "./sortlist"; import { Button } from "@mui/material"; import ListDoctors from "./listDoctors"; import LocationD from "../icons/LocationD"; import ModalSearchCity from "@/app/component/modalSearchCity"; const defaultData = { category: "", expertise: "", turn: true, gender: "هر دو", degree: "متخصص", } function DoctorsPage({ params, matchedCity, matchedState }) { const [loading, setLoading] = useState(true); const [open, setOpen] = useState(false); const [selected, setSelected] = useState({ province: matchedState?.name || params?.province, city: matchedCity?.name || params?.city, }); const [data, setData] = useState(defaultData); useEffect(() => { setTimeout(() => { setLoading(false); }, 2000); }, []); return (