({ hunks, dim, width, filePath, firstLine, fileContent }: Props)
| 15 | |
| 16 | /** Renders a list of diff hunks with ellipsis separators between them. */ |
| 17 | export function StructuredDiffList({ hunks, dim, width, filePath, firstLine, fileContent }: Props): React.ReactNode { |
| 18 | return intersperse( |
| 19 | hunks.map(hunk => ( |
| 20 | <Box flexDirection="column" key={hunk.newStart}> |
| 21 | <StructuredDiff |
| 22 | patch={hunk} |
| 23 | dim={dim} |
| 24 | width={width} |
| 25 | filePath={filePath} |
| 26 | firstLine={firstLine} |
| 27 | fileContent={fileContent} |
| 28 | /> |
| 29 | </Box> |
| 30 | )), |
| 31 | i => ( |
| 32 | <NoSelect fromLeftEdge key={`ellipsis-${i}`}> |
| 33 | <Text dimColor>...</Text> |
| 34 | </NoSelect> |
| 35 | ), |
| 36 | ); |
| 37 | } |
nothing calls this directly
no test coverage detected