Files
nobat724_front/app/specialties/page.js
T
hamedandClaude Opus 4.8 344285dce5 feat(specialties): show per-city doctor count on /specialties
Fetch active specialties with number_of_doctors from
GET /api/v1/specialties/doctor-counts (scoped to the current city via
matchedCity.id) instead of the static specialties.json, so each specialty
card shows the real doctor count.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 22:27:39 +03:30

30 lines
1006 B
JavaScript

import Layout from "@/components/layout/StLayout";
import SpecialtiesPage from "@/components/specialties";
import { getStateInfo } from "@/lib/getStateInfo";
export async function generateMetadata() {
const { matchedCity } = await getStateInfo();
const siteName = matchedCity?.site_name || "نوبت 724";
const cityName = matchedCity?.name || "";
const title = cityName
? `تخصص‌های پزشکی در ${cityName} | ${siteName}`
: `تخصص‌های پزشکی | ${siteName}`;
const description = `لیست کامل تخصص‌های پزشکی${cityName ? " در " + cityName : ""}. رزرو نوبت از متخصصین مختلف به صورت آنلاین.`;
return {
title,
description,
openGraph: { title, description },
};
}
async function Specialties() {
const { matchedCity } = await getStateInfo();
return (
<Layout name="/specialties">
<SpecialtiesPage cityId={matchedCity?.id ?? null} />
</Layout>
);
}
export default Specialties;