| 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. |
| 76 | function 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 | } |
| 87 | function ReviewRainbowLine(t0) { |
| 88 | const $ = _c(15); |
| 89 | const { |