import React from 'react' import {observer} from 'mobx-react-lite' import {View, StyleSheet} from 'react-native' import {useStores} from 'state/index' import {DesktopLeftNav} from './desktop/LeftNav' import {DesktopRightNav} from './desktop/RightNav' import {Login} from '../screens/Login' import {ErrorBoundary} from '../com/util/ErrorBoundary' import {Lightbox} from '../com/lightbox/Lightbox' import {ModalsContainer} from '../com/modals/Modal' import {Text} from 'view/com/util/text/Text' import {Composer} from './Composer.web' import {usePalette} from 'lib/hooks/usePalette' import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' import {s, colors} from 'lib/styles' import {isMobileWeb} from 'platform/detection' import {RoutesContainer, FlatNavigator} from '../../Navigation' const ShellInner = observer(() => { const store = useStores() return ( <> store.shell.closeComposer()} winHeight={0} replyTo={store.shell.composerOpts?.replyTo} onPost={store.shell.composerOpts?.onPost} /> ) }) export const Shell: React.FC = observer(() => { const pageBg = useColorSchemeStyle(styles.bgLight, styles.bgDark) const store = useStores() if (isMobileWeb) { return } if (!store.session.hasSession) { return ( ) } return ( ) }) function NoMobileWeb() { const pal = usePalette('default') return ( We're so sorry! This app is not available for mobile Web yet. Please open it on your desktop or download the iOS app. ) } const styles = StyleSheet.create({ bgLight: { backgroundColor: colors.white, }, bgDark: { backgroundColor: colors.black, // TODO }, viewBorder: { position: 'absolute', width: 1, height: '100%', borderLeftWidth: 1, borderLeftColor: colors.gray2, }, viewBorderLeft: { left: 'calc(50vw - 300px)', }, viewBorderRight: { left: 'calc(50vw + 300px)', }, noMobileWeb: { height: '100%', justifyContent: 'center', paddingHorizontal: 20, paddingBottom: 40, }, })