aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-06-25 16:58:05 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-06-25 16:58:05 -0700
commit448e91ed0b6c7519c02bbe1ac32a9d51989679db (patch)
treef202a19f87a6dc2de5ca948d6941c50245746865 /src/components
parent6f94f0bb6dbe12e23f4222a0d0e3ffb09af965d7 (diff)
Fix lint errors
Diffstat (limited to 'src/components')
-rw-r--r--src/components/camera/buttons.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/components/camera/buttons.tsx b/src/components/camera/buttons.tsx
index 321be958..936a663d 100644
--- a/src/components/camera/buttons.tsx
+++ b/src/components/camera/buttons.tsx
@@ -25,15 +25,16 @@ export const GalleryIcon: React.FC<GalleryIconProps> = ({
title,
mostRecentPhoto,
}) => {
+ const navigation = useNavigation();
return (
<TouchableOpacity
- onPress={() => navigateToImagePicker(screenType, title)}
+ onPress={() => navigateToImagePicker(navigation, screenType, title)}
style={styles.saveButton}>
<Image
source={{uri: mostRecentPhoto}}
width={40}
height={40}
- style={{borderWidth: 2, borderColor: 'white', borderRadius: 5}}
+ style={styles.galleryIcon}
/>
<Text style={styles.saveButtonLabel}>Gallery</Text>
</TouchableOpacity>
@@ -82,14 +83,14 @@ export const FlashButton: React.FC<FlashButtonProps> = ({
height={30}
width={20}
color={'white'}
- style={{zIndex: 999}}
+ style={styles.flashIcon}
/>
) : (
<FlashOffIcon
height={30}
width={20}
color={'white'}
- style={{zIndex: 999}}
+ style={styles.flashIcon}
/>
)}
<Text style={styles.saveButtonLabel}>Flash</Text>
@@ -146,4 +147,6 @@ const styles = StyleSheet.create({
alignItems: 'center',
borderRadius: 30,
},
+ galleryIcon: {borderWidth: 2, borderColor: 'white', borderRadius: 5},
+ flashIcon: {zIndex: 2},
});