/** * The platform track, as an ordered course. * * Product how-to has a running order — `sortOrder` is the curriculum, and * "your first hour in PIG" is not interchangeable with the margin report. A * grid of equal tiles says "pick one"; a numbered list says "start here", so * the two tracks are rendered as different objects rather than one * undifferentiated grid. */ import { ChevronRight } from 'lucide-react'; import { formatLearnDuration } from '@pig/core'; import { Badge, Card, Label } from '@/components/ui'; import { ArchiveControl } from './ArchiveControl'; import { learnPlayback } from './model'; import { LearnPoster } from './LearnPoster'; import { bySortOrder, type LearnResourceView } from './model'; export function LearnWalkthroughList({ resources, managing, onPlay, }: { resources: readonly LearnResourceView[]; managing: boolean; onPlay: (resource: LearnResourceView) => void; }) { const ordered = bySortOrder(resources); return ( /* Width is the caller's business — this list sits in a 1024px page column for a code-holder and in a capped column inside the shell for a member, and a cap here would fight one of them. */
    {ordered.map((resource, index) => { const playback = learnPlayback(resource); return (
  1. {managing ? ( /* A right-hand rail on a desktop row, a strip underneath on a phone — squeezed into 393px beside the text it left the title wrapping one word to a line. */
    {resource.visibility === 'code' ? 'By code' : 'Members'}
    ) : null}
  2. ); })}
); }