aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-23 17:50:22 -0400
committerGitHub <noreply@github.com>2021-06-23 17:50:22 -0400
commit53bdc94cf0491e348b7d4ad61e51ce1844423773 (patch)
tree5cc31490ed3d276e51cb1dc4385c2b26e6071ff9 /src/components/profile
parent53461e8412b1f3b95124f9d9a6f50580d26930f5 (diff)
parentd309c8e66470d8d89063b817397cd6568bf6a8bf (diff)
Merge pull request #469 from shravyaramesh/tma923-image-cropper
[TMA-923/924] Image cropper, Display arbitrary sized image
Diffstat (limited to 'src/components/profile')
-rw-r--r--src/components/profile/MomentMoreInfoDrawer.tsx8
-rw-r--r--src/components/profile/PublicProfile.tsx4
2 files changed, 3 insertions, 9 deletions
diff --git a/src/components/profile/MomentMoreInfoDrawer.tsx b/src/components/profile/MomentMoreInfoDrawer.tsx
index a796ffd8..dc4ebe32 100644
--- a/src/components/profile/MomentMoreInfoDrawer.tsx
+++ b/src/components/profile/MomentMoreInfoDrawer.tsx
@@ -3,7 +3,6 @@ import React, {useEffect, useState} from 'react';
import {
Alert,
GestureResponderEvent,
- StyleSheet,
TextStyle,
TouchableOpacity,
ViewProps,
@@ -169,7 +168,6 @@ const MomentMoreInfoDrawer: React.FC<MomentMoreInfoDrawerProps> = (props) => {
return (
<>
<TouchableOpacity
- style={styles.icon}
onPress={() => {
setIsOpen(true);
}}>
@@ -184,10 +182,4 @@ const MomentMoreInfoDrawer: React.FC<MomentMoreInfoDrawerProps> = (props) => {
);
};
-const styles = StyleSheet.create({
- icon: {
- marginRight: '3%',
- },
-});
-
export default MomentMoreInfoDrawer;
diff --git a/src/components/profile/PublicProfile.tsx b/src/components/profile/PublicProfile.tsx
index 8a80c56f..6b991d7c 100644
--- a/src/components/profile/PublicProfile.tsx
+++ b/src/components/profile/PublicProfile.tsx
@@ -87,7 +87,9 @@ const PublicProfile: React.FC<ContentProps> = ({
scrollViewRef.current
) {
setScrollEnabled(false);
- scrollViewRef.current.scrollTo({y: 0});
+ if (scrollViewRef && scrollViewRef.current) {
+ scrollViewRef.current.scrollTo({y: 0});
+ }
navigation.navigate('MomentUploadPrompt', {
screenType,
momentCategory: momentCategories[0],