MCPcopy Index your code
hub / github.com/codeaashu/claude-code / useSmoothCount

Function useSmoothCount

src/components/tasks/RemoteSessionProgress.tsx:76–86  ·  view source on GitHub ↗
(target: number, time: number, snap: boolean)

Source from the content-addressed store, hash-verified

74// the clock is frozen), bypass the tick and jump straight to target —
75// otherwise a frozen `time` would leave the ref stuck at its init value.
76function useSmoothCount(target: number, time: number, snap: boolean): number {
77 const displayed = useRef(target);
78 const lastTick = useRef(time);
79 if (snap || target < displayed.current) {
80 displayed.current = target;
81 } else if (target > displayed.current && time !== lastTick.current) {
82 displayed.current += 1;
83 lastTick.current = time;
84 }
85 return displayed.current;
86}
87function ReviewRainbowLine(t0) {
88 const $ = _c(15);
89 const {

Callers 1

ReviewRainbowLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected