From 4cb6ccf53bc7bf6a6749e9b04c7e1dd057aab56e Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Tue, 22 Jun 2021 08:26:23 -0700 Subject: Remove image cropper created before new req --- src/components/comments/ImageCropper.tsx | 93 -------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 src/components/comments/ImageCropper.tsx (limited to 'src') diff --git a/src/components/comments/ImageCropper.tsx b/src/components/comments/ImageCropper.tsx deleted file mode 100644 index 9edd5838..00000000 --- a/src/components/comments/ImageCropper.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import {RouteProp} from '@react-navigation/core'; -import {useFocusEffect} from '@react-navigation/native'; -import {StackNavigationProp} from '@react-navigation/stack'; -import React, {useCallback, useRef, useState} from 'react'; -import {Button, StatusBar, View} from 'react-native'; -import {CropView} from 'react-native-image-crop-tools'; -import {MainStackParams} from '../../routes'; -import {HeaderHeight} from '../../utils'; - -type ImageCropperRouteProps = RouteProp; - -type ImageCropperNavigationProps = StackNavigationProp< - MainStackParams, - 'ImageCropper' ->; - -interface ImageCropperProps { - route: ImageCropperRouteProps; - navigation: ImageCropperNavigationProps; -} - -const ImageCropper: React.FC = ({route, navigation}) => { - const {image, title, screenType} = route.params; - const cropViewRef = useRef(); - const aspectRatios = [ - {width: 9, height: 16}, - {width: 4, height: 5}, - {width: 1, height: 1}, - ]; - const [aspectRatioIndex, setAspectRatioIndex] = useState(0); - //Function to get the parent TabBar navigator and setting the option for this screen. - useFocusEffect( - useCallback(() => { - navigation.dangerouslyGetParent()?.setOptions({ - tabBarVisible: false, - }); - return () => { - navigation.dangerouslyGetParent()?.setOptions({ - tabBarVisible: true, - }); - }; - }, [navigation]), - ); - return ( - <> - - -