Skip to content

Commit

Permalink
Merge pull request synonymdev#880 from synonymdev/fix/profile-edit-sc…
Browse files Browse the repository at this point in the history
…roll

fix(profile): add scrollview to profile edit screen
  • Loading branch information
Nuhvi authored Feb 9, 2023
2 parents e36504b + 55c8627 commit 05346e4
Showing 1 changed file with 42 additions and 37 deletions.
79 changes: 42 additions & 37 deletions src/screens/Profile/ProfileEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useMemo, useEffect, useCallback, memo } from 'react';
import { View, StyleSheet, KeyboardAvoidingView, Platform } from 'react-native';
import { useSelector } from 'react-redux';

import { View as ThemedView } from '../../styles/components';
import { ScrollView, View as ThemedView } from '../../styles/components';
import { Text02S } from '../../styles/text';
import { PlusIcon } from '../../styles/icons';
import NavigationHeader from '../../components/NavigationHeader';
Expand Down Expand Up @@ -120,42 +120,44 @@ export const ProfileEdit = ({
}}
/>
<KeyboardAvoidingView behavior="padding" style={styles.content}>
<ProfileCard
url={url}
editable={true}
resolving={false}
profile={profile}
onChange={setField}
/>
<Divider />
<ProfileLinks links={links} editable={true} />
<Button
text="Add Link"
style={styles.addLinkButton}
onPress={(): void => {
navigation.navigate('ProfileAddLink');
}}
icon={
<PlusIcon color="brand" width={16} style={styles.addLinkButton} />
}
/>
<Divider />
<Text02S color="gray1">
Please note that all your profile information will be publicly
available and visible.
</Text02S>

{(!onboardedProfile || hasEdited) && (
<View style={buttonContainerStyles}>
<Button
style={styles.button}
text={onboardedProfile ? 'Save Profile' : 'Continue'}
size="large"
disabled={!isValid()}
onPress={save}
/>
</View>
)}
<ScrollView style={styles.scroll}>
<ProfileCard
url={url}
editable={true}
resolving={false}
profile={profile}
onChange={setField}
/>
<Divider />
<ProfileLinks links={links} editable={true} />
<Button
text="Add Link"
style={styles.addLinkButton}
onPress={(): void => {
navigation.navigate('ProfileAddLink');
}}
icon={
<PlusIcon color="brand" width={16} style={styles.addLinkButton} />
}
/>
<Divider />
<Text02S color="gray1">
Please note that all your profile information will be publicly
available and visible.
</Text02S>

{(!onboardedProfile || hasEdited) && (
<View style={buttonContainerStyles}>
<Button
style={styles.button}
text={onboardedProfile ? 'Save Profile' : 'Continue'}
size="large"
disabled={!isValid()}
onPress={save}
/>
</View>
)}
</ScrollView>
</KeyboardAvoidingView>
<SafeAreaInsets type="bottom" />
</ThemedView>
Expand All @@ -166,6 +168,9 @@ const styles = StyleSheet.create({
container: {
flex: 1,
},
scroll: {
flex: 1,
},
header: {
paddingBottom: 32,
},
Expand Down

0 comments on commit 05346e4

Please sign in to comment.