feat: Add search by name and specialty card navigation

- Implemented search functionality to filter specialties by name
- Added navigation to /doctors page with specialty ID as query parameter when clicking on a specialty card
- Enhanced user experience by providing real-time search results and clear navigation path
This commit is contained in:
2025-05-02 14:14:10 +03:30
parent 8e87b7a346
commit ee47314658
4 changed files with 59 additions and 19 deletions
+8 -1
View File
@@ -1,7 +1,13 @@
import SearchD from "@/components/icons/SearchD";
import { Button, ButtonGroup, TextField } from "@mui/material";
function SmSearch({ placeholder }) {
function SmSearch({ placeholder, onSearch }) {
const handleSearchChange = (event) => {
if (onSearch) {
onSearch(event.target.value);
}
};
return (
<ButtonGroup
variant="contained"
@@ -26,6 +32,7 @@ function SmSearch({ placeholder }) {
}}
placeholder={placeholder}
dir="rtl"
onChange={handleSearchChange}
className={`!shadow-none !w-full !px-5 !h-full bg-[#FAFAFA] !text-[14px] md:!text-[16px] !min-w-[50%] !rounded-0 !font-normal !text-[#6C757D]`}
/>
<Button