diff --git a/babel.config.js b/babel.config.js index 78edf57499..8781302721 100644 --- a/babel.config.js +++ b/babel.config.js @@ -48,7 +48,7 @@ module.exports = function (api) { ], env: { production: { - plugins: ['transform-remove-console'], + // plugins: ['transform-remove-console'], }, }, } diff --git a/src/App.native.tsx b/src/App.native.tsx index f0b1a1bc51..d7b01ef552 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -1,65 +1,25 @@ -import 'react-native-url-polyfill/auto' -import 'lib/sentry' // must be near top - -import React, {useState, useEffect} from 'react' -import {RootSiblingParent} from 'react-native-root-siblings' +import React, {useEffect} from 'react' +import {Image} from 'expo-image' +// import {Image} from 'react-native' import * as SplashScreen from 'expo-splash-screen' -import {GestureHandlerRootView} from 'react-native-gesture-handler' -import {observer} from 'mobx-react-lite' -import {QueryClientProvider} from '@tanstack/react-query' - -import 'view/icons' - -import {withSentry} from 'lib/sentry' -import {ThemeProvider} from 'lib/ThemeContext' -import {s} from 'lib/styles' -import {RootStoreModel, setupState, RootStoreProvider} from './state' -import {Shell} from 'view/shell' -import * as notifications from 'lib/notifications/notifications' -import * as analytics from 'lib/analytics/analytics' -import * as Toast from 'view/com/util/Toast' -import {queryClient} from 'lib/react-query' -import {TestCtrls} from 'view/com/testing/TestCtrls' SplashScreen.preventAutoHideAsync() -const App = observer(function AppImpl() { - const [rootStore, setRootStore] = useState( - undefined, - ) - +export default function App() { // init useEffect(() => { - setupState().then(store => { - setRootStore(store) - analytics.init(store) - notifications.init(store) - store.onSessionDropped(() => { - Toast.show('Sorry! Your session expired. Please log in again.') - }) - }) + SplashScreen.hideAsync() + console.log('hiding splash') }, []) - // show nothing prior to init - if (!rootStore) { - return null - } return ( - - - - - - - - - - - - - - + ) -}) - -export default withSentry(App) +}