Handle logged out mobile web better

This commit is contained in:
Paul Frazee 2023-03-14 14:59:37 -05:00
parent 41f4385db9
commit 528e14fe90
4 changed files with 118 additions and 52 deletions

View file

@ -12,7 +12,6 @@ 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(() => {
@ -44,10 +43,6 @@ const ShellInner = observer(() => {
export const Shell: React.FC = observer(() => {
const pageBg = useColorSchemeStyle(styles.bgLight, styles.bgDark)
if (isMobileWeb) {
return <NoMobileWeb />
}
return (
<View style={[s.hContentRegion, pageBg]}>
<RoutesContainer>
@ -57,21 +52,6 @@ export const Shell: React.FC = observer(() => {
)
})
function NoMobileWeb() {
const pal = usePalette('default')
return (
<View style={[pal.view, styles.noMobileWeb]}>
<Text type="title-2xl" style={s.pb20}>
We're so sorry!
</Text>
<Text type="lg">
This app is not available for mobile Web yet. Please open it on your
desktop or download the iOS app.
</Text>
</View>
)
}
const styles = StyleSheet.create({
bgLight: {
backgroundColor: colors.white,
@ -92,10 +72,4 @@ const styles = StyleSheet.create({
viewBorderRight: {
left: 'calc(50vw + 300px)',
},
noMobileWeb: {
height: '100%',
justifyContent: 'center',
paddingHorizontal: 20,
paddingBottom: 40,
},
})