import DoctorPage from "@/components/doctor";
import Layout from "@/components/layout/StLayout";
import axios from "axios";

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>
      <DoctorPage doctor={doctor} />
    </Layout>
  );
}

export default Doctor;
