Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US-1914 [contact side] The user is unable to scroll down. #728

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { castStyle } from 'shared/utils'

import { AccessibilityLabelStandards } from '../shared'

export const buttonHeight = 52

const getBackgroundVariety = (
backgroundVariety: AppButtonBackgroundVarietyEnum,
color: ColorValue,
Expand Down Expand Up @@ -159,7 +161,7 @@ export const AppButton = ({

const styles = StyleSheet.create({
content: castStyle.view({
minHeight: 52,
minHeight: buttonHeight,
borderRadius: 25,
flexDirection: 'row',
paddingVertical: 14,
Expand Down
23 changes: 18 additions & 5 deletions src/screens/contacts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ import { useTranslation } from 'react-i18next'
import { Image, ScrollView, StyleSheet, View } from 'react-native'
import { CompositeScreenProps, useIsFocused } from '@react-navigation/native'
import { FormProvider, useForm } from 'react-hook-form'
import { useSafeAreaInsets } from 'react-native-safe-area-context'

import { shortAddress } from 'lib/utils'

import { AppButton, AppTouchable, Typography } from 'components/index'
import {
AppButton,
AppTouchable,
Typography,
buttonHeight,
} from 'components/index'
import {
rootTabsRouteNames,
RootTabsScreenProps,
Expand Down Expand Up @@ -34,6 +40,7 @@ export type ContactsListScreenProps = CompositeScreenProps<
>

export const ContactsScreen = ({ navigation }: ContactsListScreenProps) => {
const insets = useSafeAreaInsets()
const dispatch = useAppDispatch()
const isFocused = useIsFocused()
const methods = useForm({
Expand Down Expand Up @@ -129,15 +136,21 @@ export const ContactsScreen = ({ navigation }: ContactsListScreenProps) => {
placeholder={t('search_placeholder')}
testID={testIDs.searchInput}
/>
<ScrollView style={styles.contactsList}>
<ScrollView
style={styles.contactsList}
contentContainerStyle={{
paddingBottom: insets.bottom + buttonHeight + 12,
}}>
{contactsFiltered.map((contact, index) => (
<AppTouchable
key={index + contact.name}
width={'100%'}
onPress={() =>
navigation.navigate(
contactsStackRouteNames.ContactDetails,
{ contact },
{
contact,
},
)
}>
<BasicRow
Expand Down Expand Up @@ -182,12 +195,12 @@ const styles = StyleSheet.create({
alignItems: 'flex-start',
justifyContent: 'flex-end',
}),
contactsList: {
contactsList: castStyle.view({
marginTop: 14,
padding: 10,
shadowOpacity: 0.1,
shadowRadius: 10,
},
}),
newContactButton: castStyle.view({
position: 'absolute',
bottom: 30,
Expand Down
Loading