Files
nobat724_front/app/appointment/[doctorId]/page.js
T

22 lines
576 B
JavaScript

import AppointmentPage from "@/components/appointment";
import { getStateInfo } from "@/lib/getStateInfo";
import axios from "axios";
async function Appointment({ params: { slug } }) {
const { matchedCity } = getStateInfo();
let apt = null;
try {
const response = await axios.get(
"https://back-dev.clinic-pro.ir/api/v1/appointment-slots"
);
apt = response.data.data;
} catch (error) {
// console.error("problem with req:", error.message);
}
return <AppointmentPage slug={slug} matchedCity={matchedCity} />;
}
export default Appointment;