fix: bug
This commit is contained in:
@@ -13,6 +13,7 @@ configureReanimatedLogger({
|
||||
strict: false,
|
||||
})
|
||||
import { GestureHandlerRootView } from 'react-native-gesture-handler'
|
||||
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'
|
||||
import { View, ActivityIndicator, AppState, LogBox } from 'react-native'
|
||||
import * as Updates from 'expo-updates'
|
||||
|
||||
@@ -168,18 +169,20 @@ function Providers({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<SafeAreaProvider>
|
||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||
<KeyboardProvider>
|
||||
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
|
||||
{children}
|
||||
{/* modals */}
|
||||
<BottomSheetModalProvider>
|
||||
<KeyboardProvider>
|
||||
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
|
||||
{children}
|
||||
{/* modals */}
|
||||
|
||||
{/* 挂载全局方法 */}
|
||||
<ModalPortal ref={(ref) => ((global as any).actionSheet = ref)} />
|
||||
<ModalPortal ref={(ref) => ((global as any).modal = ref)} />
|
||||
<ModalPortal ref={(ref) => ((global as any).loading = ref)} />
|
||||
<ModalPortal ref={(ref) => ((global as any).toast = ref)} />
|
||||
</ThemeProvider>
|
||||
</KeyboardProvider>
|
||||
{/* 挂载全局方法 */}
|
||||
<ModalPortal ref={(ref) => ((global as any).actionSheet = ref)} />
|
||||
<ModalPortal ref={(ref) => ((global as any).modal = ref)} />
|
||||
<ModalPortal ref={(ref) => ((global as any).loading = ref)} />
|
||||
<ModalPortal ref={(ref) => ((global as any).toast = ref)} />
|
||||
</ThemeProvider>
|
||||
</KeyboardProvider>
|
||||
</BottomSheetModalProvider>
|
||||
</GestureHandlerRootView>
|
||||
</SafeAreaProvider>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user