handle limit page dashboard & change header profile user & get data from api in page clinics & clinic item and doctor item
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import DoctorPage from "@/components/doctor";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
import doctors from "@/data/doctors.json";
|
||||
import axios from "axios";
|
||||
|
||||
function Doctor({ params: { slug } }) {
|
||||
const doctor = doctors.find((item) => item.id === +slug);
|
||||
async function Doctor({ params: { slug } }) {
|
||||
const response = await axios.get(
|
||||
`https://back-dev.clinic-pro.ir/api/v1/doctor/${slug}`
|
||||
);
|
||||
const doctor = response.data;
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
|
||||
Reference in New Issue
Block a user