change function redirect url in specialties page
This commit is contained in:
@@ -13,6 +13,7 @@ function SearchBar() {
|
|||||||
second: "",
|
second: "",
|
||||||
});
|
});
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
console.log(selected);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ButtonGroup
|
<ButtonGroup
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
import TextLoading from "@/app/component/loading/Text";
|
import TextLoading from "@/app/component/loading/Text";
|
||||||
import React from "react";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
function ItemSpecialties({ data, loading }) {
|
function ItemSpecialties({ data, loading }) {
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
const handleClick = () => {
|
|
||||||
router.push(`/doctors?specialties=${data.id}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li
|
<li>
|
||||||
onClick={handleClick}
|
<Link
|
||||||
|
href={{
|
||||||
|
pathname: "/doctors",
|
||||||
|
query: {
|
||||||
|
specialties: data.id,
|
||||||
|
},
|
||||||
|
}}
|
||||||
className="py-[17.5px] px-[12px] flex flex-col justify-center items-center gap-[16px]
|
className="py-[17.5px] px-[12px] flex flex-col justify-center items-center gap-[16px]
|
||||||
rounded-lg bg-[#FFF] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
|
rounded-lg bg-[#FFF] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
|
||||||
hover:bg-[#5559CE] transition-all duration-500 cursor-pointer hover-mode-item-speciality"
|
hover:bg-[#5559CE] transition-all duration-500 cursor-pointer hover-mode-item-speciality"
|
||||||
@@ -24,6 +23,7 @@ function ItemSpecialties({ data, loading }) {
|
|||||||
{data.number_of_doctors} پزشک
|
{data.number_of_doctors} پزشک
|
||||||
</p>
|
</p>
|
||||||
</TextLoading>
|
</TextLoading>
|
||||||
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user