( checkpointsOrCheckpointsId?: MaybeCheckpointsOrCheckpointsId, )
| 1868 | }; |
| 1869 | |
| 1870 | export const useUndoInformation = ( |
| 1871 | checkpointsOrCheckpointsId?: MaybeCheckpointsOrCheckpointsId, |
| 1872 | ): UndoOrRedoInformation => { |
| 1873 | const checkpoints = useCheckpointsOrCheckpointsById( |
| 1874 | checkpointsOrCheckpointsId, |
| 1875 | ); |
| 1876 | const [backwardIds, currentId] = getThing(useCheckpointIds(checkpoints)); |
| 1877 | return [ |
| 1878 | !arrayIsEmpty(backwardIds), |
| 1879 | useGoBackwardCallback(checkpoints), |
| 1880 | currentId, |
| 1881 | ifNotUndefined(currentId, (id) => |
| 1882 | getThing(checkpoints)?.getCheckpoint(id), |
| 1883 | ) ?? EMPTY_STRING, |
| 1884 | ]; |
| 1885 | }; |
| 1886 | |
| 1887 | export const useRedoInformation = ( |
| 1888 | checkpointsOrCheckpointsId?: MaybeCheckpointsOrCheckpointsId, |
searching dependent graphs…