change design and data list in doctor-item & handle component appointment in doctor-item & handle functionality date-picker & fix bug appointment page & add req get appointment list
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user