diff --git a/frontend/src/lib/hooks/use-previous.ts b/frontend/src/lib/hooks/use-previous.ts index 97e2240c..c792b1e4 100644 --- a/frontend/src/lib/hooks/use-previous.ts +++ b/frontend/src/lib/hooks/use-previous.ts @@ -4,6 +4,6 @@ export function usePrevious(value: T): T | undefined { const ref = useRef(); useEffect(() => { ref.current = value; - }); + }, [value]); return ref.current; }