Files
nobat724_front/app/clinics/page.js
T

23 lines
627 B
JavaScript

// app/clinics/page.js
import ClinicsPage from "@/components/clinics";
import Layout from "@/components/layout/StLayout";
import { fetchReq } from "@/lib/req";
import { getStateInfo } from "@/lib/getStateInfo";
export default async function Clinics() {
const { matchedCity, matchedState } = getStateInfo();
const API_URL = process.env.NEXT_PUBLIC_API_URL;
const clinics = await fetchReq(`${API_URL}/api/v1/clinics`);
return (
<Layout name="/clinics">
<ClinicsPage
clinics={clinics && clinics.data}
matchedCity={matchedCity}
matchedState={matchedState}
/>
</Layout>
);
}