diff options
author | Michael <michael.foiani@gmail.com> | 2021-07-13 16:03:20 -0400 |
---|---|---|
committer | Michael <michael.foiani@gmail.com> | 2021-07-13 16:03:20 -0400 |
commit | 3c846d45ada4929fae6493c4704c70544c7941a3 (patch) | |
tree | 3bcd9328ce86d1bb22f71736ac1a7df3af8f6905 /src/components/comments/ZoomInCropper.tsx | |
parent | c51abe84b279402c3b3ad541e2af80754d0c67e7 (diff) | |
parent | 68f05afdf2d4ca29df60761c3d8f8ee445c1804d (diff) |
Merged with new master.
Diffstat (limited to 'src/components/comments/ZoomInCropper.tsx')
-rw-r--r-- | src/components/comments/ZoomInCropper.tsx | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx index 7fa88f6e..e624c81c 100644 --- a/src/components/comments/ZoomInCropper.tsx +++ b/src/components/comments/ZoomInCropper.tsx @@ -1,7 +1,6 @@ import {RouteProp} from '@react-navigation/core'; -import {useFocusEffect} from '@react-navigation/native'; import {StackNavigationProp} from '@react-navigation/stack'; -import React, {useCallback, useEffect, useState} from 'react'; +import React, {useEffect, useState} from 'react'; import {Image, StyleSheet, TouchableOpacity} from 'react-native'; import {normalize} from 'react-native-elements'; import ImageZoom, {IOnMove} from 'react-native-image-pan-zoom'; @@ -25,7 +24,7 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ route, navigation, }) => { - const {screenType, title, media} = route.params; + const {screenType, media, selectedCategory} = route.params; const [aspectRatio, setAspectRatio] = useState<number>(1); // Stores the coordinates of the cropped image @@ -34,19 +33,6 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ const [y0, setY0] = useState<number>(); const [y1, setY1] = useState<number>(); - useFocusEffect( - useCallback(() => { - navigation.dangerouslyGetParent()?.setOptions({ - tabBarVisible: false, - }); - return () => { - navigation.dangerouslyGetParent()?.setOptions({ - tabBarVisible: true, - }); - }; - }, [navigation]), - ); - // Setting original aspect ratio of image useEffect(() => { if (media.uri) { @@ -77,11 +63,11 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ .then((croppedURL) => { navigation.navigate('CaptionScreen', { screenType, - title: title, media: { uri: croppedURL, isVideo: false, }, + selectedCategory, }); }) .catch((err) => console.log('err: ', err)); @@ -93,8 +79,8 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ ) { navigation.navigate('CaptionScreen', { screenType, - title: title, media, + selectedCategory, }); } }; |