diff options
author | Ivan Chen <ivan@tagg.id> | 2021-06-29 17:04:10 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-06-29 17:04:10 -0400 |
commit | d4b210518eaffd3bf1320ca7ce7fa4a6d611528f (patch) | |
tree | 7a1546101e2966b7bb38bf92bca4be64b1ccd7b6 | |
parent | 3f826ec0741d3f0d0c85a17e5d0a09eef402dbf2 (diff) |
Cleanup code, Update camera options
-rw-r--r-- | src/components/moments/Moment.tsx | 6 | ||||
-rw-r--r-- | src/utils/camera.ts | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx index 2e813142..9449271b 100644 --- a/src/components/moments/Moment.tsx +++ b/src/components/moments/Moment.tsx @@ -41,7 +41,7 @@ const Moment: React.FC<MomentProps> = ({ }) => { const navigation = useNavigation(); - const handleUploadMoment = () => { + const navigateToCameraScreen = () => { navigation.navigate('CameraScreen', { title, screenType, @@ -84,7 +84,7 @@ const Moment: React.FC<MomentProps> = ({ <PlusIcon width={23} height={23} - onPress={() => handleUploadMoment()} + onPress={() => navigateToCameraScreen()} color={TAGG_LIGHT_BLUE} style={styles.horizontalMargin} /> @@ -114,7 +114,7 @@ const Moment: React.FC<MomentProps> = ({ /> ))} {(images === undefined || images.length === 0) && !userXId && ( - <TouchableOpacity onPress={() => handleUploadMoment()}> + <TouchableOpacity onPress={() => navigateToCameraScreen()}> <LinearGradient colors={['rgba(105, 141, 211, 1)', 'rgba(105, 141, 211, 0.3)']}> <View style={styles.defaultImage}> diff --git a/src/utils/camera.ts b/src/utils/camera.ts index 77f73eea..73461ad7 100644 --- a/src/utils/camera.ts +++ b/src/utils/camera.ts @@ -18,8 +18,7 @@ export const takePicture = ( cameraRef.current?.pausePreview(); const options = { forceUpOrientation: true, - quality: 0.5, - base64: true, + writeExif: false, }; cameraRef.current?.takePictureAsync(options).then((response) => { setShowSaveButton(true); |