22 lines
596 B
JavaScript
22 lines
596 B
JavaScript
import AppointmentPage from "@/components/appointment";
|
|
import { getStateInfo } from "@/lib/getStateInfo";
|
|
import axios from "axios";
|
|
|
|
async function Appointment({ params: { slug } }) {
|
|
const { matchedCity } = getStateInfo();
|
|
const API_URL = process.env.NEXT_PUBLIC_API_URL;
|
|
|
|
let apt = null;
|
|
try {
|
|
const response = await axios.get(`${API_URL}/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;
|