aboutsummaryrefslogtreecommitdiff
path: root/src/utils/camera.ts
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-16 21:13:24 -0400
committerGitHub <noreply@github.com>2021-07-16 21:13:24 -0400
commit4ebb552aef8c5f6136c9359c54f2e4e1aa921241 (patch)
tree0fde89e8476d2f70b1aa860b02e9e7a3305dacce /src/utils/camera.ts
parentfcd80939d3b707f08a9684a61e17f99e0759d208 (diff)
parent95410f705f15f0eab611400c1b9fda4830503815 (diff)
Merge pull request #515 from brian-tagg/tma990-trimmer-cropper-screen
[TMA-990] Trimmer/cropper screen
Diffstat (limited to 'src/utils/camera.ts')
-rw-r--r--src/utils/camera.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/camera.ts b/src/utils/camera.ts
index 5485b1ca..9d7ff67f 100644
--- a/src/utils/camera.ts
+++ b/src/utils/camera.ts
@@ -48,8 +48,11 @@ export const takeVideo = (
}
};
-export const saveImageToGallery = (capturedImageURI: string) => {
- CameraRoll.save(capturedImageURI, {album: 'Recents', type: 'photo'})
+export const saveImageToGallery = (
+ capturedImageURI: string,
+ type: 'photo' | 'video',
+) => {
+ CameraRoll.save(capturedImageURI, {album: 'Recents', type: type})
.then((_res) => Alert.alert('Saved to device!'))
.catch((_err) => Alert.alert('Failed to save to device!'));
};