diff options
author | Brian Kim <brian@tagg.id> | 2021-07-15 15:04:14 -0400 |
---|---|---|
committer | Brian Kim <brian@tagg.id> | 2021-07-15 15:04:14 -0400 |
commit | 404f8b7d78674aa5fc57c83a3b44496785124fee (patch) | |
tree | df977d2600aa631746b58703f350ae42ab69be34 /src/components/comments | |
parent | fb63fdf195a2e81a03301cfbf54d5c284b8c82cf (diff) |
Initial changes
Diffstat (limited to 'src/components/comments')
-rw-r--r-- | src/components/comments/ZoomInCropper.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx index 6f8ff97c..ab45f46b 100644 --- a/src/components/comments/ZoomInCropper.tsx +++ b/src/components/comments/ZoomInCropper.tsx @@ -13,9 +13,10 @@ import { SCREEN_HEIGHT, SCREEN_WIDTH, } from '../../utils'; -import {TaggSquareButton} from '../common'; +import {TaggSquareButton, TaggLoadingIndicator} from '../common'; import ReactNativeZoomableView from '@dudigital/react-native-zoomable-view/src/ReactNativeZoomableView'; import Video from 'react-native-video'; +import Tagg from '../taggs/Tagg'; type ZoomInCropperRouteProps = RouteProp<MainStackParams, 'ZoomInCropper'>; type ZoomInCropperNavigationProps = StackNavigationProp< @@ -36,6 +37,7 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ // width and height of video, if video const [origDimensions, setOrigDimensions] = useState<number[]>([0, 0]); const vidRef = useRef<View>(null); + const [cropLoading, setCropLoading] = useState<boolean>(false); // Stores the coordinates of the cropped image const [x0, setX0] = useState<number>(); @@ -136,9 +138,12 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ cropHeight: origDimensions[1], })); } + setCropLoading(true); + console.log(cropLoading); cropVideo( media.uri, (croppedURL: string) => { + setCropLoading(false); navigation.navigate('CaptionScreen', { screenType, media: { @@ -255,6 +260,7 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ return ( <View style={styles.container}> + {cropLoading && <TaggLoadingIndicator fullscreen />} <TouchableOpacity style={styles.closeButton} onPress={() => navigation.goBack()}> |