16 lines
487 B
TypeScript
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]);
|
|
}
|