diff options
author | Ivan Chen <ivan@tagg.id> | 2021-07-16 18:51:34 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-07-16 18:51:34 -0400 |
commit | cce1f4ad7f3331ef5c111423fe46fc1d59c7638d (patch) | |
tree | cc148905f4277c239a8aebaa38d402bd3b32488a /src/utils/camera.ts | |
parent | 1e0f1c0c6200af5d4f9554778341d991b47381da (diff) |
Clean up styles, Fix save to gallery
Diffstat (limited to 'src/utils/camera.ts')
-rw-r--r-- | src/utils/camera.ts | 7 |
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!')); }; |