diff --git a/src/App.native.tsx b/src/App.native.tsx index 7eccb84ec6..b9e9a5eca0 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -53,12 +53,10 @@ SplashScreen.preventAutoHideAsync() function InnerApp() { const {isInitialLoad, currentAccount} = useSession() const {resumeSession} = useSessionApi() - const queryClient = useQueryClient() const theme = useColorModeTheme() const {_} = useLingui() useIntentHandler() - useNotificationsListener(queryClient) // init useEffect(() => { @@ -78,25 +76,27 @@ function InnerApp() { // Resets the entire tree below when it changes: key={currentAccount?.did}> - - - - - - - {/* All components should be within this provider */} - - - - - - - - - - - - + + + + + + + + {/* All components should be within this provider */} + + + + + + + + + + + + + @@ -105,6 +105,12 @@ function InnerApp() { ) } +function PushNotificationsListener({children}: {children: React.ReactNode}) { + const queryClient = useQueryClient() + useNotificationsListener(queryClient) + return children +} + function App() { const [isReady, setReady] = useState(false)