MCPcopy
hub / github.com/tinyplex/tinybase / CheckpointInfo

Function CheckpointInfo

test/unit/core/ui-solid/primitives.test.ts:662–678  ·  view source on GitHub ↗
({
  mode,
  checkpoints,
}: {
  readonly mode: string;
  readonly checkpoints: Checkpoints;
})

Source from the content-addressed store, hash-verified

660};
661
662const CheckpointInfo = ({
663 mode,
664 checkpoints,
665}: {
666 readonly mode: string;
667 readonly checkpoints: Checkpoints;
668}) => {
669 const undoInformation = useUndoInformation(checkpoints);
670 const redoInformation = useRedoInformation(checkpoints);
671 return (() => {
672 const button = document.createElement('button');
673 const [available, action, checkpointId, label] =
674 mode == 'undoInformation' ? undoInformation : redoInformation;
675 button.addEventListener('click', action);
676 return [JSON.stringify([available, checkpointId ?? null, label]), button];
677 }) as unknown as JSXElement;
678};
679
680const State = ({
681 mode,

Callers

nothing calls this directly

Calls 3

useUndoInformationFunction · 0.90
useRedoInformationFunction · 0.90
addEventListenerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…