From e2468a1ba1ee361636c09b671c8ff4edf9bfa297 Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Mon, 5 Oct 2026 00:08:45 +0330 Subject: [PATCH] Wire live business contact data and refresh homepage/about branding. Pull landline, cell, and address from Meshkee business-info across footer and contact surfaces, update brand spelling and 14-year messaging, and keep product cards free of placeholder call-to-action pricing. Co-authored-by: Cursor --- CLAUDE.md | 6 + CONTEXT.md | 14 ++ src/app/about/page.tsx | 96 ++++++++----- src/app/blog/[id]/[slug]/page.tsx | 4 +- src/app/blog/page.tsx | 6 +- src/app/contact/page.tsx | 125 ++++++++++------- src/app/layout.tsx | 4 +- src/app/page.tsx | 6 +- src/app/products/[id]/[slug]/page.tsx | 26 ++-- .../products/category/[id]/[slug]/page.tsx | 4 +- src/app/products/page.tsx | 6 +- src/components/About.tsx | 6 +- src/components/ContactInfo.tsx | 127 ++++++++++-------- src/components/Footer.tsx | 43 ++++-- src/components/Header.tsx | 8 +- src/components/HeaderNav.tsx | 32 +++-- src/components/Hero.tsx | 4 +- src/components/HeroSlider.tsx | 6 +- src/components/HomeContactStrip.tsx | 34 +++-- src/components/ImportCountries.tsx | 2 +- src/components/ProductCard.tsx | 10 +- src/components/Stats.tsx | 39 ++++-- src/lib/meshkee.ts | 119 ++++++++++++++++ 23 files changed, 499 insertions(+), 228 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 89340b4..6bc6c7a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,6 +20,12 @@ Meshkee Website API (`https://api.meshkee.com/api/v1`, docs at sharing the same display name under different ids (backend data-entry artifact). The summary merges by name and links to whichever id holds the most products under that name. +- Business contact data (`getBusinessInfo` / + `getResolvedBusinessContact`) comes from + `GET /tenants/{domain}/website/business-info` — landline/cell + (`phoneNumbers`), addresses, emails, social. Footer, contact page, + and `HomeContactStrip` consume the resolved helper. Empty/failed + fetches keep the previous hardcoded address and phone fallbacks. ## Static image slots (business-managed overrides) diff --git a/CONTEXT.md b/CONTEXT.md index 01bb5ad..507bb7f 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -31,6 +31,20 @@ Dashboard import catalog: `GET /meshkee/static-image-slots` (`src/app/meshkee/st If a rendered image size or crop ratio changes, update both the component container (`aspectRatioToCss`) and the matching catalog entry. +## Business contact (business-info) + +`GET /tenants/aradarisman.com/website/business-info` → `getBusinessInfo` / +`getResolvedBusinessContact` in `src/lib/meshkee.ts`. + +| Field | UI | +|---|---| +| `phoneNumbers` (`landline` / `cell`) | Footer, `ContactInfo`, `HomeContactStrip` | +| `addresses[0]` | Footer, `ContactInfo` (map pin is fixed coords on contact page) | +| `emails` | Footer | +| `socialMedia` | Contact page social icons (when set) | + +Failed/empty responses keep local address + phone fallbacks so the page never blanks out. + ## Other conventions - Category tiles from live products (`getCategorySummary`) because the raw `/categories` taxonomy has duplicate display names. diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index d3eac31..0091c6d 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -4,36 +4,54 @@ import Link from "next/link"; import Container from "@/components/Container"; import PageBanner from "@/components/PageBanner"; import MissionVision from "@/components/MissionVision"; -import ImportCountries from "@/components/ImportCountries"; import Features from "@/components/Features"; import { pageMetadata } from "@/lib/seo"; +import { + getResolvedBusinessContact, + phoneTelHref, +} from "@/lib/meshkee"; export const metadata: Metadata = pageMetadata({ - title: "درباره ما | آراد آریسمان", + title: "درباره ما | آراد اَریسمان", description: - "آشنایی با شرکت آراد آریسمان؛ بیش از ۲۳ سال تجربه در تولید و عرضه مکمل‌های غذایی دام، طیور و زنبور عسل.", + "آشنایی با شرکت آراد اَریسمان؛ بیش از ۲۳ سال تجربه در تولید و عرضه مکمل‌های غذایی دام، طیور و زنبور عسل.", path: "/about", }); -export default function AboutPage() { +export default async function AboutPage() { + const contact = await getResolvedBusinessContact(); + const phone = contact.primaryPhone; + return ( <>
-
+
محصولات آراد آریسمان +
+
+ آراد اَریسمان +
@@ -42,7 +60,7 @@ export default function AboutPage() { تغذیه مطمئن، پرورش موفق

- شرکت آراد آریسمان پیشرو در تولید و عرضه افزودنی‌های خوراک، ویتامین‌ها و + شرکت آراد اَریسمان پیشرو در تولید و عرضه افزودنی‌های خوراک، ویتامین‌ها و مکمل‌های غذایی دام و طیور با بیش از ۲۳ سال فعالیت در بازار ایران می‌باشد. واردات این شرکت عمدتا از تولیدکنندگان معتبر بین‌المللی غذای دام و طیور از کشورهای انگلستان، فرانسه، ترکیه، هندوستان و چین می‌باشد. @@ -53,18 +71,28 @@ export default function AboutPage() { نتیجه‌ی این رویکرد، اعتماد پایدار بیش از ۲۳۰ مشتری در سراسر کشور است.

-
-
-
۲۳+
-
سال تجربه
-
-
-
۲۳۰+
-
رضایت مشتری
-
-
-
۵
-
کشور واردات
+
+
+
+

+ ۱۴ سال +

+

+ 14 years of experience +

+
+
+

+ تولید تخصصی محصولات +
+ مکمل دام و طیور +

@@ -75,16 +103,14 @@ export default function AboutPage() {
- چرا آراد آریسمان + چرا آراد اَریسمان

- مزایای مکمل‌های آراد آریسمان + مزایای مکمل‌های آراد اَریسمان

- -
@@ -92,7 +118,7 @@ export default function AboutPage() { برای مشاوره و خرید محصولات همین حالا با ما در تماس باشید

- کارشناسان آراد آریسمان آماده پاسخگویی به سوالات شما درباره مکمل‌ها و + کارشناسان آراد اَریسمان آماده پاسخگویی به سوالات شما درباره مکمل‌ها و نحوه مصرف آن‌ها هستند.

@@ -102,13 +128,15 @@ export default function AboutPage() { > تماس با ما - - 09104067935 - + {phone ? ( + + {phone.number} + + ) : null}
diff --git a/src/app/blog/[id]/[slug]/page.tsx b/src/app/blog/[id]/[slug]/page.tsx index 16af46e..18fb770 100644 --- a/src/app/blog/[id]/[slug]/page.tsx +++ b/src/app/blog/[id]/[slug]/page.tsx @@ -31,7 +31,7 @@ export async function generateMetadata({ if (!post) return {}; const title = postTitle(post); return pageMetadata({ - title: `${title} | آراد آریسمان`, + title: `${title} | آراد اَریسمان`, description: postExcerpt(post, 160), path: blogPath(post), }); @@ -114,7 +114,7 @@ export default async function BlogDetailPage({
-

نویسنده: تیم آراد آریسمان

+

نویسنده: تیم آراد اَریسمان

برای مشاوره تخصصی تغذیه دام و طیور با ما در تماس باشید.

diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index d333d4f..7715f8b 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -6,9 +6,9 @@ import Pagination from "@/components/Pagination"; import { getPosts } from "@/lib/meshkee"; export const metadata = pageMetadata({ - title: "مقالات | آراد آریسمان", + title: "مقالات | آراد اَریسمان", description: - "مقالات آموزشی درباره تغذیه دام، طیور و زنبور عسل از تیم آراد آریسمان.", + "مقالات آموزشی درباره تغذیه دام، طیور و زنبور عسل از تیم آراد اَریسمان.", path: "/blog", }); @@ -33,7 +33,7 @@ export default async function BlogPage({ return ( <> diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx index 4c0ce5e..0756132 100644 --- a/src/app/contact/page.tsx +++ b/src/app/contact/page.tsx @@ -3,24 +3,49 @@ import PageBanner from "@/components/PageBanner"; import ContactInfo from "@/components/ContactInfo"; import ContactForm from "@/components/ContactForm"; import { pageMetadata } from "@/lib/seo"; +import { + getResolvedBusinessContact, + phoneTelHref, +} from "@/lib/meshkee"; export const metadata = pageMetadata({ - title: "تماس با ما | آراد آریسمان", + title: "تماس با ما | آراد اَریسمان", description: - "راه‌های ارتباطی با شرکت آراد آریسمان؛ آدرس، تلفن تماس و فرم ارسال پیام.", + "راه‌های ارتباطی با شرکت آراد اَریسمان؛ آدرس، تلفن تماس و فرم ارسال پیام.", path: "/contact", }); -const mapQuery = encodeURIComponent( - "قم، شهرک صنعتی شکوهیه، خیابان شهید بروجردی" -); +function telegramHref(handle: string): string { + const trimmed = handle.trim(); + if (!trimmed) return "#"; + if (trimmed.startsWith("http")) return trimmed; + return `https://t.me/${trimmed.replace(/^@/, "")}`; +} + +function whatsappHref(value: string): string { + const trimmed = value.trim(); + if (!trimmed) return "#"; + if (trimmed.startsWith("http")) return trimmed; + const digits = trimmed + .replace(/[۰-۹]/g, (d) => String("۰۱۲۳۴۵۶۷۸۹".indexOf(d))) + .replace(/[^\d]/g, ""); + return digits ? `https://wa.me/${digits}` : "#"; +} + +const MAP_LAT = 34.79998060691881; +const MAP_LNG = 50.8027208051919; + +export default async function ContactPage() { + const contact = await getResolvedBusinessContact(); + const telegram = contact.socialMedia.telegram?.trim() || ""; + const whatsapp = contact.socialMedia.whatsapp?.trim() || ""; + const primaryPhone = contact.primaryPhone; -export default function ContactPage() { return ( <> @@ -44,8 +69,8 @@ export default function ContactPage() {