(getCheckpoints: (checkpointIds: CheckpointIds) => Ids)
| 124 | |
| 125 | export const getUseCheckpointView = |
| 126 | (getCheckpoints: (checkpointIds: CheckpointIds) => Ids) => |
| 127 | ({ |
| 128 | checkpoints, |
| 129 | checkpointComponent: Checkpoint = CheckpointView, |
| 130 | getCheckpointComponentProps, |
| 131 | separator, |
| 132 | debugIds, |
| 133 | }: ( |
| 134 | BackwardCheckpointsProps | CurrentCheckpointProps | ForwardCheckpointsProps |
| 135 | ) & { |
| 136 | readonly separator?: ReactElement | string; |
| 137 | }): any => { |
| 138 | const resolvedCheckpoints = useCheckpointsOrCheckpointsById(checkpoints); |
| 139 | return ( |
| 140 | <Wrap separator={separator}> |
| 141 | {arrayMap( |
| 142 | getCheckpoints(useCheckpointIds(resolvedCheckpoints)), |
| 143 | (checkpointId: Id) => ( |
| 144 | <Checkpoint |
| 145 | key={checkpointId} |
| 146 | {...getProps(getCheckpointComponentProps, checkpointId as Id)} |
| 147 | checkpoints={resolvedCheckpoints} |
| 148 | checkpointId={checkpointId} |
| 149 | debugIds={debugIds} |
| 150 | /> |
| 151 | ), |
| 152 | )} |
| 153 | </Wrap> |
| 154 | ); |
| 155 | }; |
no test coverage detected
searching dependent graphs…