( checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId, )
| 2252 | }; |
| 2253 | |
| 2254 | export const useUndoInformation: typeof useUndoInformationDecl = ( |
| 2255 | checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId, |
| 2256 | ): UndoOrRedoInformation => { |
| 2257 | const checkpoints = useCheckpointsOrCheckpointsById( |
| 2258 | checkpointsOrCheckpointsId, |
| 2259 | ); |
| 2260 | const [backwardIds, currentId] = useCheckpointIds(checkpoints); |
| 2261 | return [ |
| 2262 | !arrayIsEmpty(backwardIds), |
| 2263 | useGoBackwardCallback(checkpoints), |
| 2264 | currentId, |
| 2265 | ifNotUndefined(currentId, (id) => checkpoints?.getCheckpoint(id)) ?? |
| 2266 | EMPTY_STRING, |
| 2267 | ]; |
| 2268 | }; |
| 2269 | |
| 2270 | export const useRedoInformation: typeof useRedoInformationDecl = ( |
| 2271 | checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId, |
searching dependent graphs…