aboutsummaryrefslogtreecommitdiff
path: root/src/components/comments
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/comments')
-rw-r--r--src/components/comments/ZoomInCropper.tsx20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx
index 4b35464c..85b25541 100644
--- a/src/components/comments/ZoomInCropper.tsx
+++ b/src/components/comments/ZoomInCropper.tsx
@@ -61,8 +61,26 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({
width: Math.abs(x0 - x1),
height: Math.abs(y0 - y1),
})
- .then((croppedURL) => console.log('croppedURL: ', croppedURL))
+ .then((croppedURL) => {
+ navigation.navigate('CaptionScreen', {
+ screenType,
+ title: title,
+ image: {filename: croppedURL, path: croppedURL},
+ });
+ })
.catch((err) => console.log('err: ', err));
+ } else if (
+ x0 === undefined &&
+ x1 === undefined &&
+ y0 === undefined &&
+ y1 === undefined &&
+ image.sourceURL
+ ) {
+ navigation.navigate('CaptionScreen', {
+ screenType,
+ title: title,
+ image: {filename: image.sourceURL, path: image.sourceURL},
+ });
}
console.log('crop photo and send to caption screen');
};