/** * @file Shared layout component for individual integration guide pages. * * Provides the background atmosphere, back-link, header (logo + title), * category badge, prose-styled content area, and a related integrations section. * Styling matches ciphera-website /learn article layout for consistency. */ import Link from 'next/link' import { ArrowLeftIcon, ArrowRightIcon, CodeBlock } from '@ciphera-net/ui' import { type ReactNode } from 'react' import { type Integration, getIntegration, categoryLabels } from '@/lib/integrations' interface IntegrationGuideProps { /** Integration metadata (name, icon, etc.) */ integration: Integration /** Guide content rendered inside the prose area */ children: ReactNode } /** * Renders the full-page layout for a single integration guide, * including related integrations at the bottom. */ export function IntegrationGuide({ integration, children }: IntegrationGuideProps) { // * Scale the icon up for the detail-page header (w-10 h-10) const headerIcon = (
{integration.icon}
) // * Resolve related integrations from IDs const relatedIntegrations = integration.relatedIds .map((id) => getIntegration(id)) .filter((i): i is Integration => i !== undefined) .slice(0, 4) const categoryLabel = categoryLabels[integration.category] return (
{/* * --- ATMOSPHERE (Background) --- */}
{/* * --- Back link --- */} Back to Integrations {/* * --- Category + Official site badges --- */}
{integration.icon}
{integration.name}
{categoryLabel}
{/* * --- Title --- */}

{integration.name} Integration

{/* * --- Prose content (matches ciphera-website /learn styling) --- */}
{children}

Optional: Frustration Tracking

Detect rage clicks and dead clicks by adding the frustration tracking add-on after the core script:

{``}

No extra configuration needed. Add data-no-rage or{' '} data-no-dead to disable individual signals.

{/* * --- Related Integrations --- */} {relatedIntegrations.length > 0 && (

Related Integrations

{relatedIntegrations.map((related) => (
{related.icon}
{related.name} {related.description}
))}
)}
) }