mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-20 14:38:58 -04:00
Add "end" to useEffect
This commit is contained in:
@@ -57,7 +57,8 @@ const useCounter = ({ name, start = 0, end, duration = 2, saveState = true }: Us
|
||||
if (saveState && value == end) {
|
||||
setLastValue(name, end);
|
||||
}
|
||||
}, [value]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [end, value]);
|
||||
|
||||
if (start === end) return end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user