feat: remove unused intro prop and related rendering in DoctorsPage component
This commit is contained in:
@@ -5,8 +5,6 @@ import { getStateInfo } from "@/lib/getStateInfo";
|
||||
import { fetchReq } from "@/lib/req";
|
||||
import { isNextRedirectError } from "@/lib/maintenance";
|
||||
import { listingRobots } from "@/lib/listingRobots";
|
||||
import { buildDoctorsIntro } from "@/lib/listingIntro";
|
||||
import { resolveCityDisplayName } from "@/lib/domainHelpers";
|
||||
|
||||
export async function generateMetadata({ searchParams }) {
|
||||
const awaitedParams = await searchParams;
|
||||
@@ -77,13 +75,6 @@ async function Doctors({ searchParams }) {
|
||||
params={searchParams}
|
||||
matchedCity={matchedCity}
|
||||
matchedState={matchedState}
|
||||
// متن مقدمه سمت سرور ساخته میشود تا در HTML اولیه باشد و خزنده ببیندش.
|
||||
// buildDoctorsIntro از قبل نوشته و تست شده بود اما هیچجا رندر نمیشد، پس
|
||||
// این صفحه روی هر ۳۵ دامنه محتوای یکسان داشت.
|
||||
intro={buildDoctorsIntro(
|
||||
resolveCityDisplayName(isRoot ? null : matchedCity),
|
||||
doctors?.meta?.totalRecords
|
||||
)}
|
||||
/>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ import states from "@/data/state.json";
|
||||
import cities from "@/data/city.json";
|
||||
import { isRootCity } from "@/lib/rootCity";
|
||||
|
||||
function DoctorsPage({ matchedCity, matchedState, list, intro }) {
|
||||
function DoctorsPage({ matchedCity, matchedState, list }) {
|
||||
const searchParams = useSearchParams();
|
||||
const [page, setPage] = useState(list?.meta?.currentPage || 1);
|
||||
const [doctors, setDoctors] = useState(list?.data);
|
||||
@@ -60,11 +60,6 @@ function DoctorsPage({ matchedCity, matchedState, list, intro }) {
|
||||
matchedCity={matchedCity}
|
||||
matchedState={matchedState}
|
||||
/>
|
||||
{intro && (
|
||||
<p className="text-[#525252] text-[14px] md:text-[16px] font-normal leading-8 mt-[24px] text-justify">
|
||||
{intro}
|
||||
</p>
|
||||
)}
|
||||
<ListDoctors
|
||||
limit={12}
|
||||
data={list}
|
||||
|
||||
Reference in New Issue
Block a user