MCPcopy Index your code
hub / github.com/tinyplex/tinybase / useRedoInformation

Function useRedoInformation

src/ui-react/hooks.ts:2270–2284  ·  view source on GitHub ↗
(
  checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
)

Source from the content-addressed store, hash-verified

2268};
2269
2270export const useRedoInformation: typeof useRedoInformationDecl = (
2271 checkpointsOrCheckpointsId?: CheckpointsOrCheckpointsId,
2272): UndoOrRedoInformation => {
2273 const checkpoints = useCheckpointsOrCheckpointsById(
2274 checkpointsOrCheckpointsId,
2275 );
2276 const [, , [forwardId]] = useCheckpointIds(checkpoints);
2277 return [
2278 !isUndefined(forwardId),
2279 useGoForwardCallback(checkpoints),
2280 forwardId,
2281 ifNotUndefined(forwardId, (id) => checkpoints?.getCheckpoint(id)) ??
2282 EMPTY_STRING,
2283 ];
2284};
2285
2286export const useCheckpointIdsListener: typeof useCheckpointIdsListenerDecl = (
2287 listener: CheckpointIdsListener,

Callers 2

CheckpointInfoFunction · 0.90
TestFunction · 0.90

Calls 5

useCheckpointIdsFunction · 0.90
isUndefinedFunction · 0.90
useGoForwardCallbackFunction · 0.90
getCheckpointMethod · 0.65

Tested by 2

CheckpointInfoFunction · 0.72
TestFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…