diff options
author | Ivan Chen <ivan@tagg.id> | 2021-06-30 13:55:28 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-06-30 13:55:28 -0400 |
commit | 2f3244dfa11cc23b804930ad448222bbff4f022a (patch) | |
tree | 5b2d2705c2885f9432f94f876009561e757a8786 /src/components/moments/Moment.tsx | |
parent | 5480267b285812c094246bb941c6deaf83f53ff5 (diff) |
Squashed commit of the following:
commit 66c974161b59f1e3570e2a4a42334fabc16c2129
Merge: 53bdc94c d4b21051
Author: Ivan Chen <ivan@tagg.id>
Date: Tue Jun 29 17:06:19 2021 -0400
Merge pull request #476 from shravyaramesh/tma937-tagg-camera
[TMA-937] Tagg Camera
commit d4b210518eaffd3bf1320ca7ce7fa4a6d611528f
Author: Ivan Chen <ivan@tagg.id>
Date: Tue Jun 29 17:04:10 2021 -0400
Cleanup code, Update camera options
commit 3f826ec0741d3f0d0c85a17e5d0a09eef402dbf2
Author: Ivan Chen <ivan@tagg.id>
Date: Tue Jun 29 16:45:45 2021 -0400
Set to only allow photos
commit 9d30c0c211e6b0b1b87e5de93a043e6e9f06beb3
Author: Ivan Chen <ivan@tagg.id>
Date: Tue Jun 29 16:44:41 2021 -0400
Cleanup code, Fix gallery icon bug
commit f6fdd5d913c29855644f226d09d6cba60faf6e21
Author: Ivan Chen <ivan@tagg.id>
Date: Tue Jun 29 16:32:19 2021 -0400
Add error handling
commit 5fcffd40746b2074d523f53dc82c824d147444e5
Author: Ivan Chen <ivan@tagg.id>
Date: Tue Jun 29 16:29:06 2021 -0400
Refactor buttons
commit f273a7aa1c2e27692c2a03ae1e2fc9b81360558d
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 17:18:47 2021 -0700
Fix lint errors
commit 448e91ed0b6c7519c02bbe1ac32a9d51989679db
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 16:58:05 2021 -0700
Fix lint errors
commit 6f94f0bb6dbe12e23f4222a0d0e3ffb09af965d7
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 16:50:13 2021 -0700
Add missing description for permissions
commit 727c6384a2a07c42cd132d02da8c7dbb5757ea4f
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 16:50:00 2021 -0700
Refactor code, Fix orientation bug
commit f596a0246a9b9453df3a93c8c3fc5c9137bb50fc
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 03:26:00 2021 -0700
Create camera screen, Add to Navigator
commit 0646d38547319200f7f725cdd76b1ed9b531a188
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 03:24:54 2021 -0700
Navigate to camera screen, Move image picker funct
commit f0762b7a3171f99833eb3c3f5e723c472dbc4879
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 03:23:56 2021 -0700
Add assets for camera screen
commit 3c4676b7646fbddc43bf5d9796b7cbac185b6664
Author: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri Jun 25 03:23:33 2021 -0700
Add package, install for camera lib
Diffstat (limited to 'src/components/moments/Moment.tsx')
-rw-r--r-- | src/components/moments/Moment.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx index a43a2830..b080ca4a 100644 --- a/src/components/moments/Moment.tsx +++ b/src/components/moments/Moment.tsx @@ -1,9 +1,8 @@ import {useNavigation} from '@react-navigation/native'; import React from 'react'; -import {Alert, StyleProp, StyleSheet, View, ViewStyle} from 'react-native'; +import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native'; import {Text} from 'react-native-animatable'; import {ScrollView, TouchableOpacity} from 'react-native-gesture-handler'; -import ImagePicker from 'react-native-image-crop-picker'; import LinearGradient from 'react-native-linear-gradient'; import DeleteIcon from '../../assets/icons/delete-logo.svg'; import DownIcon from '../../assets/icons/down_icon.svg'; @@ -11,7 +10,6 @@ import BigPlusIcon from '../../assets/icons/plus-icon-white.svg'; import PlusIcon from '../../assets/icons/plus-icon.svg'; import UpIcon from '../../assets/icons/up_icon.svg'; import {TAGG_LIGHT_BLUE} from '../../constants'; -import {ERROR_UPLOAD} from '../../constants/strings'; import {MomentType, ScreenType} from '../../types'; import {normalize, SCREEN_WIDTH} from '../../utils'; import MomentTile from './MomentTile'; @@ -108,6 +106,11 @@ const Moment: React.FC<MomentProps> = ({ Alert.alert(ERROR_UPLOAD); } }); + const navigateToCameraScreen = () => { + navigation.navigate('CameraScreen', { + title, + screenType, + }); }; return ( @@ -174,7 +177,7 @@ const Moment: React.FC<MomentProps> = ({ <PlusIcon width={23} height={23} - onPress={() => navigateToImagePicker()} + onPress={() => navigateToCameraScreen()} color={TAGG_LIGHT_BLUE} style={styles.horizontalMargin} /> @@ -204,7 +207,7 @@ const Moment: React.FC<MomentProps> = ({ /> ))} {(images === undefined || images.length === 0) && !userXId && ( - <TouchableOpacity onPress={() => navigateToImagePicker()}> + <TouchableOpacity onPress={() => navigateToCameraScreen()}> <LinearGradient colors={['rgba(105, 141, 211, 1)', 'rgba(105, 141, 211, 0.3)']}> <View style={styles.defaultImage}> |