/** * @file Shared layout component for individual integration guide pages. * * Provides the background atmosphere, back-link, header (logo + title), * prose-styled content area, and a related integrations section. */ import Link from 'next/link' import { ArrowLeftIcon, ArrowRightIcon } from '@ciphera-net/ui' import { type ReactNode } from 'react' import { type Integration, getIntegration } 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) return (
{/* * --- ATMOSPHERE (Background) --- */}
Back to Integrations
{headerIcon}

{integration.name} Integration

{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}
))}
)}
) }