From 855f31eed8dda9dd7d4ff98a632d5c3297fc9ca0 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Thu, 27 Jun 2024 17:06:05 +0330 Subject: [PATCH] basic style doctor page --- app/doctor/[slug]/page.js | 16 ++++++++++++++ app/doctors/page.js | 4 ++-- app/globals.css | 2 +- .../doctor/appointmentList/AppointmentList.js | 7 +++++++ components/doctor/detailDoctor/index.js | 7 +++++++ components/doctor/index.js | 19 +++++++++++++++++ components/doctors/listDoctors/ItemDoctor.js | 21 +++++++++++-------- 7 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 app/doctor/[slug]/page.js create mode 100644 components/doctor/appointmentList/AppointmentList.js create mode 100644 components/doctor/detailDoctor/index.js create mode 100644 components/doctor/index.js diff --git a/app/doctor/[slug]/page.js b/app/doctor/[slug]/page.js new file mode 100644 index 0000000..de96bff --- /dev/null +++ b/app/doctor/[slug]/page.js @@ -0,0 +1,16 @@ +import DoctorPage from "@/components/doctor"; +import doctors from '@/data/doctors.json'; +import Layout from "@/components/layout"; + +function Doctor({ params: { slug } }) { + + const doctor = doctors.find(item => item.id === +slug); + + return ( + + + + ) +} + +export default Doctor \ No newline at end of file diff --git a/app/doctors/page.js b/app/doctors/page.js index 6ce312c..e77feda 100644 --- a/app/doctors/page.js +++ b/app/doctors/page.js @@ -1,7 +1,7 @@ import DoctorsPage from '@/components/doctors'; import Layout from '@/components/layout'; -function index() { +function Doctors() { return ( @@ -9,4 +9,4 @@ function index() { ) } -export default index \ No newline at end of file +export default Doctors \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 0d48227..80d94fd 100644 --- a/app/globals.css +++ b/app/globals.css @@ -118,7 +118,7 @@ body { font-family: iran-sans; padding: 0; margin: 0; - background: #F5F5F5; + background: #FAFAFA; } .font-kalame { diff --git a/components/doctor/appointmentList/AppointmentList.js b/components/doctor/appointmentList/AppointmentList.js new file mode 100644 index 0000000..e98c1bd --- /dev/null +++ b/components/doctor/appointmentList/AppointmentList.js @@ -0,0 +1,7 @@ +function AppointmentList() { + return ( +
AppointmentList
+ ) +} + +export default AppointmentList \ No newline at end of file diff --git a/components/doctor/detailDoctor/index.js b/components/doctor/detailDoctor/index.js new file mode 100644 index 0000000..dbf45e3 --- /dev/null +++ b/components/doctor/detailDoctor/index.js @@ -0,0 +1,7 @@ +function DetailDoctor() { + return ( +
DetailDoctor
+ ) +} + +export default DetailDoctor \ No newline at end of file diff --git a/components/doctor/index.js b/components/doctor/index.js new file mode 100644 index 0000000..69c8171 --- /dev/null +++ b/components/doctor/index.js @@ -0,0 +1,19 @@ +import AppointmentList from "./appointmentList/AppointmentList" +import DetailDoctor from "./detailDoctor" + +function DoctorPage({ doctor }) { + return ( +
+
+

متخصص {doctor.expertise} {' >'}

+

{doctor.name}

+
+
+ + +
+
+ ) +} + +export default DoctorPage \ No newline at end of file diff --git a/components/doctors/listDoctors/ItemDoctor.js b/components/doctors/listDoctors/ItemDoctor.js index e28b5b3..fb25a05 100644 --- a/components/doctors/listDoctors/ItemDoctor.js +++ b/components/doctors/listDoctors/ItemDoctor.js @@ -6,6 +6,7 @@ import ArrowLeftD from "@/components/icons/ArrowLeftD" import ClockD from "@/components/icons/ClockD" import LikeD from "@/components/icons/LikeD" import PointD from "@/components/icons/PointD" +import Link from "next/link" function ItemDoctor({ doctor }) { return ( @@ -52,16 +53,18 @@ function ItemDoctor({ doctor }) { }

{/* Arrow */} - + '!bg-[#5559CE]' : + '!bg-[#D7D7D7]' + }`} + disabled={!doctor.free_turn} + > + + + ) }