refactor: pass doctorSlug prop to AppointmentList and ItemAppointment components

This commit is contained in:
hamed
2025-11-12 21:05:06 +03:30
parent 7e655356e5
commit 573edc1eb9
4 changed files with 8 additions and 8 deletions
@@ -6,7 +6,7 @@ import { Button } from "@mui/material";
import Image from "next/image";
import Link from "next/link";
function ItemAppointment({ turn, loading }) {
function ItemAppointment({ turn, loading, doctorSlug }) {
return (
<li
key={turn.id}
@@ -50,7 +50,7 @@ function ItemAppointment({ turn, loading }) {
</p>
</TextLoading>
</div>
<Link href={loading ? "#" : `/appointment/${turn.id}`}>
<Link href={loading ? "#" : `/appointment/${doctorSlug}`}>
<Button
variant="contained"
className="!py-2 !px-3 xl:!px-6 gap-1"