import { Link, useParams } from 'react-router-dom'; import { MachineCard } from '@/components/catalogue/MachineCard'; import { MachineThumbnail } from '@/components/catalogue/MachineThumbnail'; import { Badge } from '@/components/ui/Badge'; import { Button } from '@/components/ui/Button'; import { Panel } from '@/components/ui/Panel'; import { appConfig } from '@/config/appConfig'; import { getMachineBySlug, getRelatedMachines } from '@/data/machineRegistry'; import { usePageMetadata } from '@/hooks/usePageMetadata'; import { usePreferencesStore } from '@/store/preferencesStore'; import { difficultyDescription, difficultyToTone, partCountLabel, phaseLabel } from '@/utils/format'; import { NotFoundPage } from '@/pages/NotFoundPage'; export function MachineDetailPage() { const { machineSlug } = useParams<'machineSlug'>(); const machine = getMachineBySlug(machineSlug); usePageMetadata({ title: machine ? machine.title : 'Machine not found', description: machine?.shortDescription, canonicalPath: machine ? `/machines/${machine.slug}` : undefined, type: 'article' }); const favourites = usePreferencesStore((state) => state.favourites); const toggleFavourite = usePreferencesStore((state) => state.toggleFavourite); if (!machine) { return ; } const isFavourite = favourites.includes(machine.slug); const relatedMachines = getRelatedMachines(machine, appConfig.catalogue.maxRelatedMachines); return (
← Back to catalogue
{machine.category} {machine.difficulty} {phaseLabel(machine.releasePhase)}

{machine.title}

{machine.subtitle}

{machine.description}

Complexity

{machine.complexity}/5

Estimated model

{machine.estimatedPartCount}

Annotated

{machine.parts.length}

Component model

{partCountLabel(machine.parts.length)} prepared for viewer controls

{machine.estimatedPartCount} estimated render parts
{machine.parts.map((part) => (

{part.name}

{part.description}

{part.material ? (

Material · {part.material}

) : null}
))}

Applications

    {machine.applications.map((application) => (
  • ))}

Guided tour goals

    {machine.learningObjectives.map((objective, index) => (
  1. {index + 1} {objective}
  2. ))}
{relatedMachines.length > 0 ? (

Continue exploring

{relatedMachines.map((related) => ( ))}
) : null}
); }