Files
discord-decomp/modules/app_launcher/native/hooks/useAnimationDelayedAutoFocus.tsx
T
2026-11-01 12:12:55 +02:00

16 lines
487 B
TypeScript

// Metro module 11346 (f11347).
import { useRef, useEffect } from "react";
import { useAwaitAnimationCompletion } from "./useAwaitAnimationComplete";
export function useAnimationDelayedAutoFocus(a0, a1) {
const awaitAnimationCompletion = useAwaitAnimationCompletion();
const ref = useRef(false);
useEffect(() => {
if (a0 && !ref.current) {
awaitAnimationCompletion(() => {
a1();
});
}
ref.current = true;
}, [a0, a1, awaitAnimationCompletion]);
}