From 3480e9997af759e42730cada55b1f5100de6661c Mon Sep 17 00:00:00 2001 From: Ehsan Date: Tue, 9 Jul 2024 19:08:33 +0330 Subject: [PATCH] change footer & add pagination to doctors page & add page specialties --- app/specialties/page.js | 12 ++++++++++++ components/doctors/listDoctors/index.js | 18 ++++++++++++++++++ components/layout/Header.js | 11 +++++++---- components/layout/index.js | 6 +++--- components/specialties/index.js | 7 +++++++ 5 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 app/specialties/page.js create mode 100644 components/specialties/index.js diff --git a/app/specialties/page.js b/app/specialties/page.js new file mode 100644 index 0000000..3ebb4ec --- /dev/null +++ b/app/specialties/page.js @@ -0,0 +1,12 @@ +import DoctorsPage from '@/components/doctors'; +import Layout from '@/components/layout'; + +function Doctors() { + return ( + + + + ) +} + +export default Doctors \ No newline at end of file diff --git a/components/doctors/listDoctors/index.js b/components/doctors/listDoctors/index.js index 5d35112..140e78c 100644 --- a/components/doctors/listDoctors/index.js +++ b/components/doctors/listDoctors/index.js @@ -1,5 +1,6 @@ import doctors from '@/data/doctors.json' import ItemDoctor from './ItemDoctor'; +import { Pagination } from '@mui/material'; function ListDoctors() { return ( @@ -12,6 +13,23 @@ function ListDoctors() { /> ))} +
+ +
) } diff --git a/components/layout/Header.js b/components/layout/Header.js index c631815..ebc6251 100644 --- a/components/layout/Header.js +++ b/components/layout/Header.js @@ -3,7 +3,10 @@ import { listNav } from "@/constans"; import { Button } from "@mui/material"; import Link from "next/link"; -function Header() { +function Header({ name }) { + + console.log(name); + return (
{nav.name} diff --git a/components/layout/index.js b/components/layout/index.js index 1293df7..0e97f63 100644 --- a/components/layout/index.js +++ b/components/layout/index.js @@ -1,18 +1,18 @@ import Footer from './Footer'; import Header from './Header'; -function Layout({ children, title }) { +function Layout({ children, title, name }) { return (
-
+
{children}
-