Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -7,7 +7,7 @@ export async function generateMetadata() {
|
|||||||
const siteName = matchedCity?.site_name || "نوبت 724";
|
const siteName = matchedCity?.site_name || "نوبت 724";
|
||||||
const title = `درباره ما | ${siteName}`;
|
const title = `درباره ما | ${siteName}`;
|
||||||
const description = `آشنایی با ${siteName}، سیستم آنلاین نوبتدهی پزشکی. هدف ما ارائه خدمات سریع و کارآمد رزرو نوبت پزشکی برای همه مردم است.`;
|
const description = `آشنایی با ${siteName}، سیستم آنلاین نوبتدهی پزشکی. هدف ما ارائه خدمات سریع و کارآمد رزرو نوبت پزشکی برای همه مردم است.`;
|
||||||
const image = "https://nobat724.com/assets/images/logo.png";
|
const image = "/assets/images/og-image.png";
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { getRequestOrigin } from "@/lib/getCanonicalUrl";
|
|||||||
import { safeJsonLd } from "@/lib/sanitize";
|
import { safeJsonLd } from "@/lib/sanitize";
|
||||||
import { normalizeBlog, imageUrl } from "@/helper";
|
import { normalizeBlog, imageUrl } from "@/helper";
|
||||||
|
|
||||||
const FALLBACK_IMG = "https://nobat724.com/assets/images/logo.png";
|
const FALLBACK_IMG = "/assets/images/og-image.png";
|
||||||
const API_URL = process.env.NEXT_PUBLIC_API_URL;
|
const API_URL = process.env.NEXT_PUBLIC_API_URL;
|
||||||
|
|
||||||
const getBlog = cache(async (slug) => {
|
const getBlog = cache(async (slug) => {
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ export async function generateMetadata() {
|
|||||||
const siteName = matchedCity?.site_name || "نوبت 724";
|
const siteName = matchedCity?.site_name || "نوبت 724";
|
||||||
const title = `مقالات و اخبار پزشکی | ${siteName}`;
|
const title = `مقالات و اخبار پزشکی | ${siteName}`;
|
||||||
const description = `جدیدترین مقالات، اخبار و راهنماهای پزشکی. اطلاعات تخصصی در حوزه سلامت و پزشکی از متخصصان ${siteName}.`;
|
const description = `جدیدترین مقالات، اخبار و راهنماهای پزشکی. اطلاعات تخصصی در حوزه سلامت و پزشکی از متخصصان ${siteName}.`;
|
||||||
const image = "https://nobat724.com/assets/images/logo.png";
|
const image = "/assets/images/og-image.png";
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export async function generateMetadata({ params }) {
|
|||||||
|
|
||||||
const image = clinic.images_clinic?.[0]?.url
|
const image = clinic.images_clinic?.[0]?.url
|
||||||
? [imageUrl(clinic.images_clinic[0].url)]
|
? [imageUrl(clinic.images_clinic[0].url)]
|
||||||
: ["https://nobat724.com/assets/images/logo.png"];
|
: ["/assets/images/og-image.png"];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ export async function generateMetadata({ searchParams }) {
|
|||||||
const description = cityName
|
const description = cityName
|
||||||
? `لیست کلینیکها و مراکز درمانی در ${cityName}. رزرو آنلاین نوبت از بهترین مراکز درمانی ${cityName}.`
|
? `لیست کلینیکها و مراکز درمانی در ${cityName}. رزرو آنلاین نوبت از بهترین مراکز درمانی ${cityName}.`
|
||||||
: `جستجوی کلینیکها و مراکز درمانی در سراسر کشور. رزرو آنلاین نوبت سریع و آسان.`;
|
: `جستجوی کلینیکها و مراکز درمانی در سراسر کشور. رزرو آنلاین نوبت سریع و آسان.`;
|
||||||
const image = "https://nobat724.com/assets/images/logo.png";
|
const image = "/assets/images/og-image.png";
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { safeJsonLd } from "@/lib/sanitize";
|
|||||||
import { imageUrl } from "@/helper";
|
import { imageUrl } from "@/helper";
|
||||||
|
|
||||||
const API_URL = process.env.NEXT_PUBLIC_API_URL;
|
const API_URL = process.env.NEXT_PUBLIC_API_URL;
|
||||||
const FALLBACK_IMG = "https://nobat724.com/assets/images/logo.png";
|
const FALLBACK_IMG = "/assets/images/og-image.png";
|
||||||
|
|
||||||
const getDoctor = cache(async (slug) => {
|
const getDoctor = cache(async (slug) => {
|
||||||
if (!slug || slug === "undefined") return null;
|
if (!slug || slug === "undefined") return null;
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ export async function generateMetadata({ searchParams }) {
|
|||||||
const description = cityName
|
const description = cityName
|
||||||
? `لیست پزشکان متخصص در ${cityName}. جستجو بر اساس تخصص و منطقه. رزرو آنلاین نوبت پزشکی در ${cityName}.`
|
? `لیست پزشکان متخصص در ${cityName}. جستجو بر اساس تخصص و منطقه. رزرو آنلاین نوبت پزشکی در ${cityName}.`
|
||||||
: `جستجوی پزشکان متخصص در سراسر کشور. رزرو آنلاین نوبت پزشکی سریع و آسان با نوبت 724.`;
|
: `جستجوی پزشکان متخصص در سراسر کشور. رزرو آنلاین نوبت پزشکی سریع و آسان با نوبت 724.`;
|
||||||
const image = "https://nobat724.com/assets/images/logo.png";
|
const image = "/assets/images/og-image.png";
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
|
|||||||
+2
-2
@@ -45,13 +45,13 @@ export async function generateMetadata() {
|
|||||||
type: "website",
|
type: "website",
|
||||||
locale: "fa_IR",
|
locale: "fa_IR",
|
||||||
siteName: matchedCity?.site_name || repContext?.full_name || "نوبت 724",
|
siteName: matchedCity?.site_name || repContext?.full_name || "نوبت 724",
|
||||||
images: ["https://nobat724.com/assets/images/logo.png"],
|
images: ["/assets/images/og-image.png"],
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: "summary_large_image",
|
card: "summary_large_image",
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
images: ["https://nobat724.com/assets/images/logo.png"],
|
images: ["/assets/images/og-image.png"],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export async function generateMetadata() {
|
|||||||
? `تخصصهای پزشکی در ${cityName} | ${siteName}`
|
? `تخصصهای پزشکی در ${cityName} | ${siteName}`
|
||||||
: `تخصصهای پزشکی | ${siteName}`;
|
: `تخصصهای پزشکی | ${siteName}`;
|
||||||
const description = `لیست کامل تخصصهای پزشکی${cityName ? " در " + cityName : ""}. رزرو نوبت از متخصصین مختلف به صورت آنلاین.`;
|
const description = `لیست کامل تخصصهای پزشکی${cityName ? " در " + cityName : ""}. رزرو نوبت از متخصصین مختلف به صورت آنلاین.`;
|
||||||
const image = "https://nobat724.com/assets/images/logo.png";
|
const image = "/assets/images/og-image.png";
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user