mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-08 18:41:30 -04:00
Add "end" to useEffect
This commit is contained in:
1 file changed
+2
-1
@@ -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