14 lines
532 B
TypeScript
14 lines
532 B
TypeScript
// Metro module 11339 (f11340).
|
|
import { createContext, useMemo, useContext } from "react";
|
|
const context = createContext(null);
|
|
export function AwaitAnimationContext(props) {
|
|
const { children, handleQueuedCallback } = props;
|
|
return <context.Provider value={useMemo(() => ({
|
|
handleQueuedCallback
|
|
}), [handleQueuedCallback])}>{children}</context.Provider>;
|
|
}
|
|
export function useAwaitAnimationCompletion() {
|
|
const context2 = useContext(context);
|
|
return context2 == null ? (a0) => a0() : context2.handleQueuedCallback;
|
|
}
|