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.bio}
+Source: {company.bio_source} @@ -217,6 +232,72 @@ export default async function ManufacturerProfile({
{e.bio}
} + {e.linkedin_url && ( + + LinkedIn ↗ + + )} +