26 lines
635 B
JavaScript
26 lines
635 B
JavaScript
// app/clinics/page.js
|
|
import ClinicsPage from "@/components/clinics";
|
|
import Layout from "@/components/layout/StLayout";
|
|
import { getStateInfo } from "@/lib/getStateInfo";
|
|
import axios from "axios";
|
|
|
|
export default async function Clinics() {
|
|
const { matchedCity, matchedState } = getStateInfo();
|
|
|
|
const response = await axios.get(
|
|
"https://back-dev.clinic-pro.ir/api/v1/clinics?page=1&limit=10"
|
|
);
|
|
|
|
const clinics = response.data.$data;
|
|
|
|
return (
|
|
<Layout name="/clinics">
|
|
<ClinicsPage
|
|
clinics={clinics}
|
|
matchedCity={matchedCity}
|
|
matchedState={matchedState}
|
|
/>
|
|
</Layout>
|
|
);
|
|
}
|