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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user