Skip to content

Commit

Permalink
Fix root sibling context issue (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Nov 14, 2023
1 parent 0a26e78 commit 00f8c8b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
17 changes: 9 additions & 8 deletions src/App.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,19 @@ const InnerApp = observer(function AppImpl() {

return (
<ThemeProvider theme={colorMode}>
<RootSiblingParent>
<analytics.Provider>
<RootStoreProvider value={rootStore}>
<I18nProvider i18n={i18n}>
<analytics.Provider>
<RootStoreProvider value={rootStore}>
<I18nProvider i18n={i18n}>
{/* All components should be within this provider */}
<RootSiblingParent>
<GestureHandlerRootView style={s.h100pct}>
<TestCtrls />
<Shell />
</GestureHandlerRootView>
</I18nProvider>
</RootStoreProvider>
</analytics.Provider>
</RootSiblingParent>
</RootSiblingParent>
</I18nProvider>
</RootStoreProvider>
</analytics.Provider>
</ThemeProvider>
)
})
Expand Down
19 changes: 10 additions & 9 deletions src/App.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,19 @@ const InnerApp = observer(function AppImpl() {

return (
<ThemeProvider theme={colorMode}>
<RootSiblingParent>
<analytics.Provider>
<RootStoreProvider value={rootStore}>
<I18nProvider i18n={i18n}>
<analytics.Provider>
<RootStoreProvider value={rootStore}>
<I18nProvider i18n={i18n}>
{/* All components should be within this provider */}
<RootSiblingParent>
<SafeAreaProvider>
<Shell />
</SafeAreaProvider>
</I18nProvider>
<ToastContainer />
</RootStoreProvider>
</analytics.Provider>
</RootSiblingParent>
</RootSiblingParent>
</I18nProvider>
<ToastContainer />
</RootStoreProvider>
</analytics.Provider>
</ThemeProvider>
)
})
Expand Down

0 comments on commit 00f8c8b

Please sign in to comment.