diff options
Diffstat (limited to 'src/Splash.android.tsx')
-rw-r--r-- | src/Splash.android.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Splash.android.tsx b/src/Splash.android.tsx new file mode 100644 index 000000000..a12b52b8b --- /dev/null +++ b/src/Splash.android.tsx @@ -0,0 +1,17 @@ +import {useEffect} from 'react' +import * as SplashScreen from 'expo-splash-screen' + +type Props = { + isReady: boolean +} + +export function Splash({isReady, children}: React.PropsWithChildren<Props>) { + useEffect(() => { + if (isReady) { + SplashScreen.hideAsync() + } + }, [isReady]) + if (isReady) { + return children + } +} |