diff --git a/pages/rewind/index.tsx b/pages/rewind/index.tsx index bb46ed0..cd3c689 100644 --- a/pages/rewind/index.tsx +++ b/pages/rewind/index.tsx @@ -39,6 +39,7 @@ function Image({ src }: { src: string }) { ); } +// TODO: Memory optimization export default function RewindPage() { const { port, apiKey } = useAtomValue(apiInfoAtom); const [timeline, setTimeline] = useState([]); @@ -168,9 +169,9 @@ export default function RewindPage() { const handleScroll = (e: React.WheelEvent) => { if (!containerRef.current || !currentFrameId) return; - // Only allow scroll changes every 80ms + // Only allow scroll changes every 30ms const now = Date.now(); - if (now - lastScrollTime.current < 80) return; + if (now - lastScrollTime.current < 30) return; lastScrollTime.current = now; const delta = Math.sign(e.deltaY); @@ -235,30 +236,6 @@ export default function RewindPage() { ) || "Loading..." : "Loading..."} - - {/* Timeline */} -