From dffa6b5853f573126ac14a353ab2f3b01321b16c Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Fri, 16 Jul 2021 18:32:34 -0400
Subject: Add save button

---
 src/components/camera/SaveButton.tsx | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

(limited to 'src/components/camera/SaveButton.tsx')

diff --git a/src/components/camera/SaveButton.tsx b/src/components/camera/SaveButton.tsx
index 0e220497..104e7c30 100644
--- a/src/components/camera/SaveButton.tsx
+++ b/src/components/camera/SaveButton.tsx
@@ -1,23 +1,18 @@
 import React from 'react';
 import {Text, TouchableOpacity} from 'react-native';
 import SaveIcon from '../../assets/icons/camera/save.svg';
-import {saveImageToGallery} from '../../utils/camera';
 import {styles} from './styles';
 
 interface SaveButtonProps {
-  capturedImageURI: string;
+  onPress: () => void;
 }
 
 /*
  * Appears when a picture has been taken,
  * On click, saves the captured image to "Recents" album on device gallery
  */
-export const SaveButton: React.FC<SaveButtonProps> = ({capturedImageURI}) => (
-  <TouchableOpacity
-    onPress={() => {
-      saveImageToGallery(capturedImageURI);
-    }}
-    style={styles.saveButton}>
+export const SaveButton: React.FC<SaveButtonProps> = ({onPress}) => (
+  <TouchableOpacity onPress={onPress} style={styles.saveButton}>
     <SaveIcon width={40} height={40} />
     <Text style={styles.saveButtonLabel}>Save</Text>
   </TouchableOpacity>
-- 
cgit v1.2.3-70-g09d2

