From 1df15e3a003e73d5822c4413ab54e11530ded381 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Wed, 8 Jan 2025 00:12:41 -0400 Subject: [PATCH] REF: Use Icons from icon packcage --- components/CameraScreen.tsx | 34 ++++++++++++++++++--------------- img/camera-rotate-solid@1x.png | Bin 35437 -> 0 bytes img/camera-rotate-solid@2x.png | Bin 92486 -> 0 bytes img/camera-rotate-solid@3x.png | Bin 158842 -> 0 bytes img/flash-off.png | Bin 20890 -> 0 bytes img/flash-off@2x.png | Bin 46935 -> 0 bytes img/flash-off@3x.png | Bin 76018 -> 0 bytes img/flash-on.png | Bin 2105 -> 0 bytes img/flash-on@2x.png | Bin 4550 -> 0 bytes img/flash-on@3x.png | Bin 7417 -> 0 bytes screen/send/ScanQRCode.js | 5 ++--- 11 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 img/camera-rotate-solid@1x.png delete mode 100644 img/camera-rotate-solid@2x.png delete mode 100644 img/camera-rotate-solid@3x.png delete mode 100644 img/flash-off.png delete mode 100644 img/flash-off@2x.png delete mode 100644 img/flash-off@3x.png delete mode 100644 img/flash-on.png delete mode 100644 img/flash-on@2x.png delete mode 100644 img/flash-on@3x.png diff --git a/components/CameraScreen.tsx b/components/CameraScreen.tsx index 14a56acf8..cc3d75eae 100644 --- a/components/CameraScreen.tsx +++ b/components/CameraScreen.tsx @@ -1,19 +1,19 @@ import React, { useState, useRef } from 'react'; -import { Animated, ImageURISource, SafeAreaView, StatusBar, StyleSheet, TouchableOpacity, View } from 'react-native'; +import { Animated, SafeAreaView, StatusBar, StyleSheet, TouchableOpacity, View } from 'react-native'; import { Camera, CameraApi, CameraType, Orientation } from 'react-native-camera-kit'; import loc from '../loc'; import { Icon } from '@rneui/base'; +const AnimatedIcon = Animated.createAnimatedComponent(Icon); + interface CameraScreenProps { onCancelButtonPress: () => void; showImagePickerButton?: boolean; showFilePickerButton?: boolean; onImagePickerButtonPress?: () => void; onFilePickerButtonPress?: () => void; - torchOnImage?: ImageURISource; - torchOffImage?: ImageURISource; + onReadCode?: (event: any) => void; - cameraFlipImage?: ImageURISource; } const CameraScreen: React.FC = ({ @@ -22,10 +22,8 @@ const CameraScreen: React.FC = ({ showFilePickerButton, onImagePickerButtonPress, onFilePickerButtonPress, - torchOnImage, - torchOffImage, + onReadCode, - cameraFlipImage, }) => { const cameraRef = useRef(null); const [torchMode, setTorchMode] = useState(false); @@ -51,7 +49,7 @@ const CameraScreen: React.FC = ({ inputRange: [1, 4], outputRange: ['180deg', '-90deg'], }); - const uiRotationStyle = rotateUi ? { transform: [{ rotate: uiRotation }] } : undefined; + const uiRotationStyle = rotateUi ? { transform: [{ rotate: uiRotation }] } : {}; function rotateUiTo(rotationValue: number) { Animated.timing(orientationAnim, { @@ -67,10 +65,11 @@ const CameraScreen: React.FC = ({