File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " xlog " : patch
3+ ---
4+
5+ Hide the splash screen after the navigation is rendered.
Original file line number Diff line number Diff line change 1- import React from "react" ;
1+ import React , { useEffect } from "react" ;
22import { useTranslation } from "react-i18next" ;
33import { useSafeAreaInsets } from "react-native-safe-area-context" ;
44
55import { HeaderBackButton } from "@react-navigation/elements" ;
66import { createNativeStackNavigator } from "@react-navigation/native-stack" ;
7+ import * as SplashScreen from "expo-splash-screen" ;
78
89import { CharacterListPage } from "@/pages/CharacterList" ;
910import { ClaimCSBPage } from "@/pages/ClaimCSB" ;
@@ -34,6 +35,10 @@ export const RootNavigator = () => {
3435 const { bottom } = useSafeAreaInsets ( ) ;
3536 const i18n = useTranslation ( "common" ) ;
3637
38+ useEffect ( ( ) => {
39+ SplashScreen . hideAsync ( ) ;
40+ } , [ ] ) ;
41+
3742 return (
3843 < RootStack . Navigator initialRouteName = "Home" >
3944 { /* Without header */ }
Original file line number Diff line number Diff line change 11import { type FC , type PropsWithChildren , useEffect } from "react" ;
22
33import { useFonts } from "expo-font" ;
4- import * as SplashScreen from "expo-splash-screen" ;
54
65export const PreloadProvider : FC < PropsWithChildren < { } > > = ( { children } ) => {
76 const [ fontsLoadingReady ] = useFonts ( {
@@ -13,12 +12,6 @@ export const PreloadProvider: FC<PropsWithChildren<{}>> = ({ children }) => {
1312
1413 const allReady = fontsLoadingReady ;
1514
16- useEffect ( ( ) => {
17- if ( allReady ) {
18- SplashScreen . hideAsync ( ) ;
19- }
20- } , [ allReady ] ) ;
21-
2215 if ( ! allReady )
2316 return null ;
2417
You can’t perform that action at this time.
0 commit comments