diff --git a/src/components/advanced/AdvancedTools.tsx b/src/components/advanced/AdvancedTools.tsx index 48c7814..f0daed0 100644 --- a/src/components/advanced/AdvancedTools.tsx +++ b/src/components/advanced/AdvancedTools.tsx @@ -45,22 +45,22 @@ export function AdvancedTools() {
- Built for the FGA community + Built for the FGA community
diff --git a/src/components/minerals/CounterpartsSection.astro b/src/components/minerals/CounterpartsSection.astro index a4cec4b..e945674 100644 --- a/src/components/minerals/CounterpartsSection.astro +++ b/src/components/minerals/CounterpartsSection.astro @@ -5,6 +5,7 @@ */ import type { Mineral } from '../../lib/db-server'; import { cleanCrystalSvg, isValidSvg } from '../../lib/svg-utils'; +import { formatLabel } from '../../lib/format-label'; interface Props { /** The current mineral being viewed */ @@ -21,6 +22,10 @@ const isNatural = !mineral.origin || mineral.origin === 'natural'; const hasCounterparts = counterparts.length > 0; const hasNaturalCounterpart = !!naturalCounterpart; +// Strip the parenthetical expression label (e.g. "Diamond (Octahedron)" → "Diamond") +// — synthetics list is family-scoped, so the expression name is misleading. +const familyName = mineral.name.replace(/\s*\([^)]*\)\s*$/, '').trim(); + // Don't render if nothing to show if (!hasCounterparts && !hasNaturalCounterpart) return; @@ -39,7 +44,7 @@ const originStyles: Record{isNatural - ? `Known synthetic and simulant versions of ${mineral.name}` + ? `Known synthetic and simulant versions of ${familyName}` : `The natural gem this ${mineral.origin} imitates` }
@@ -79,7 +84,7 @@ const originStyles: Record