28 lines
633 B
JavaScript
28 lines
633 B
JavaScript
import DoctorsPage from "@/components/doctors";
|
|
import Layout from "@/components/layout/StLayout";
|
|
import { getStateInfo } from "@/lib/getStateInfo";
|
|
import axios from "axios";
|
|
|
|
async function Doctors({ searchParams }) {
|
|
const { matchedCity, matchedState } = getStateInfo();
|
|
|
|
const response = await axios.get(
|
|
"https://back-dev.clinic-pro.ir/api/v1/doctors"
|
|
);
|
|
|
|
const doctors = response.data.$data;
|
|
|
|
return (
|
|
<Layout>
|
|
<DoctorsPage
|
|
list={doctors}
|
|
params={searchParams}
|
|
matchedCity={matchedCity}
|
|
matchedState={matchedState}
|
|
/>
|
|
</Layout>
|
|
);
|
|
}
|
|
|
|
export default Doctors;
|