fix scrolling in delete account modal (#2733)

zio/stable
Hailey 2024-02-05 15:00:13 -08:00 committed by GitHub
parent 33902a0351
commit c84b654812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 12 deletions

View File

@ -1,11 +1,12 @@
import React from 'react'
import {
SafeAreaView,
ActivityIndicator,
StyleSheet,
TouchableOpacity,
View,
} from 'react-native'
import {TextInput} from './util'
import {TextInput, ScrollView} from './util'
import LinearGradient from 'react-native-linear-gradient'
import * as Toast from '../util/Toast'
import {Text} from '../util/text/Text'
@ -20,8 +21,9 @@ import {Trans, msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {useModalControls} from '#/state/modals'
import {useSession, useSessionApi, getAgent} from '#/state/session'
import {isAndroid} from 'platform/detection'
export const snapPoints = ['60%']
export const snapPoints = isAndroid ? ['90%'] : ['55%']
export function Component({}: {}) {
const pal = usePalette('default')
@ -76,8 +78,10 @@ export function Component({}: {}) {
closeModal()
}
return (
<View style={[styles.container, pal.view]}>
<View style={[styles.innerContainer, pal.view]}>
<SafeAreaView style={[s.flex1]}>
<ScrollView
contentContainerStyle={[pal.view]}
keyboardShouldPersistTaps="handled">
<View style={[styles.titleContainer, pal.view]}>
<Text type="title-xl" style={[s.textCenter, pal.text]}>
<Trans>Delete Account</Trans>
@ -234,18 +238,12 @@ export function Component({}: {}) {
)}
</>
)}
</View>
</View>
</ScrollView>
</SafeAreaView>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
innerContainer: {
paddingBottom: 20,
},
titleContainer: {
display: 'flex',
flexDirection: 'row',