mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
UI: Improve performance of April Fools Easter egg (#1977)
This commit is contained in:
@@ -45,9 +45,12 @@ export function Apr1(): React.ReactElement {
|
||||
const [n, setN] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) {
|
||||
return;
|
||||
}
|
||||
const id = setInterval(() => setN((n) => (n + 1) % frames.length), 100);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
}, [open]);
|
||||
|
||||
useEffect(
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user