Skip to content

Commit

Permalink
chore: try UnistylesProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Dec 11, 2024
1 parent c6903bf commit cb8ca6c
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { AppState, LogBox } from 'react-native'
import { GestureHandlerRootView } from 'react-native-gesture-handler'
import { createModalStack, ModalProvider } from 'react-native-modalfy'
import { SafeAreaView } from 'react-native-safe-area-context'
import { UnistylesProvider } from 'react-native-unistyles'
import { SWRConfig } from 'swr'

import { Text } from '~/components'
Expand Down Expand Up @@ -118,19 +119,21 @@ export default function Root() {
},
}}
>
<PortalProvider>
<ThemeProvider value={navigationTheme}>
<GestureHandlerRootView style={{ flex: 1 }}>
<BottomSheetModalProvider>
<ModalProvider stack={stack}>
<Slot />
<Toaster />
</ModalProvider>
</BottomSheetModalProvider>
</GestureHandlerRootView>
{__DEV__ && <DrizzleStudio />}
</ThemeProvider>
</PortalProvider>
<UnistylesProvider>
<PortalProvider>
<ThemeProvider value={navigationTheme}>
<GestureHandlerRootView style={{ flex: 1 }}>
<BottomSheetModalProvider>
<ModalProvider stack={stack}>
<Slot />
<Toaster />
</ModalProvider>
</BottomSheetModalProvider>
</GestureHandlerRootView>
{__DEV__ && <DrizzleStudio />}
</ThemeProvider>
</PortalProvider>
</UnistylesProvider>
</SWRConfig>
)
}

0 comments on commit cb8ca6c

Please sign in to comment.