From d82b8edd217633708509218d639b178b95bf3356 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Tue, 26 May 2026 23:45:04 +0000 Subject: [PATCH] manufacturers/[slug]: executive leadership + phone + street address Renders bb.manufacturer_executives rows as a card grid (photo, name, title, bio excerpt, LinkedIn link). Adds a Headquarters section with the street-level hq_address + phone (tel: link) + contact email. Bio text is now whitespace-preserving so multi-paragraph copy from the admin editor renders correctly. --- src/app/manufacturers/[slug]/page.tsx | 93 +++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 6 deletions(-) diff --git a/src/app/manufacturers/[slug]/page.tsx b/src/app/manufacturers/[slug]/page.tsx index 0069dfa..7ded85d 100644 --- a/src/app/manufacturers/[slug]/page.tsx +++ b/src/app/manufacturers/[slug]/page.tsx @@ -14,21 +14,19 @@ async function loadManufacturer(slug: string) { const { data } = await supabase .from("tracked_companies") .select( - "id, slug, company_name, bio, bio_source, logo_url, company_website, contact_email, contact_url, hq_city, hq_country, linkedin_url, twitter_handle, youtube_url, press_url, categories, exhibits_nab, exhibits_ibc, mention_count, last_mentioned, featured, ad_status" + "id, slug, company_name, bio, bio_source, logo_url, company_website, contact_email, contact_url, phone, hq_address, hq_city, hq_country, linkedin_url, twitter_handle, youtube_url, press_url, categories, exhibits_nab, exhibits_ibc, mention_count, last_mentioned, featured, ad_status" ) .eq("slug", slug) .eq("directory_visible", true) .maybeSingle(); if (!data) return null; - // Per-show appearances const { data: shows } = await supabase .from("trade_show_exhibitors") .select("show, show_year, booth, description, url, website") .eq("exhibitor_name", data.company_name) .order("show_year", { ascending: false }); - // Recent BB stories that mention this company (mention_count guides interest) const { data: pressReleases } = await supabase .from("press_releases") .select("title, slug, published_at, source_url") @@ -36,7 +34,19 @@ async function loadManufacturer(slug: string) { .order("published_at", { ascending: false }) .limit(10); - return { company: data, shows: shows || [], pressReleases: pressReleases || [] }; + const { data: executives } = await supabase + .from("manufacturer_executives") + .select("id, name, title, photo_url, linkedin_url, bio") + .eq("company_id", data.id) + .order("sort_order") + .order("name"); + + return { + company: data, + shows: shows || [], + pressReleases: pressReleases || [], + executives: executives || [], + }; } export async function generateMetadata({ @@ -76,7 +86,7 @@ export default async function ManufacturerProfile({ const { slug } = await params; const result = await loadManufacturer(slug); if (!result) notFound(); - const { company, shows, pressReleases } = result; + const { company, shows, pressReleases, executives } = result; const jsonLd = { "@context": "https://schema.org", @@ -149,6 +159,11 @@ export default async function ManufacturerProfile({ {[company.hq_city, company.hq_country].filter(Boolean).join(", ")} )} + {company.phone && ( + + {company.phone} + + )}
{company.company_website && ( @@ -208,7 +223,7 @@ export default async function ManufacturerProfile({ {company.bio && (

About

-

{company.bio}

+
{company.bio}
{company.bio_source && (

Source: {company.bio_source} @@ -217,6 +232,72 @@ export default async function ManufacturerProfile({

)} + {executives.length > 0 && ( +
+

Executive leadership

+
+ {executives.map((e: any) => ( +
+ {e.photo_url ? ( + /* eslint-disable-next-line @next/next/no-img-element */ + {e.name} + ) : ( +
+ {(e.name || "?").trim().charAt(0).toUpperCase()} +
+ )} +
+
{e.name}
+ {e.title &&
{e.title}
} + {e.bio &&

{e.bio}

} + {e.linkedin_url && ( + + LinkedIn ↗ + + )} +
+
+ ))} +
+
+ )} + + {(company.hq_address || company.phone || company.contact_email) && ( +
+

Headquarters

+
+ {company.hq_address &&
{company.hq_address}
} + {(company.hq_city || company.hq_country) && ( +
{[company.hq_city, company.hq_country].filter(Boolean).join(", ")}
+ )} + {company.phone && ( +
+ + {company.phone} + +
+ )} + {company.contact_email && ( +
+ + {company.contact_email} + +
+ )} +
+
+ )} + {company.categories && company.categories.length > 0 && (

Categories