Removed Cameraview.tsx and call Cameraview directly in ScannerScreen, Added enableTorch
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Camera } from 'expo-camera';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
|
||||
interface CameraViewProps {
|
||||
onBarcodeScanned?: (data: any) => void;
|
||||
barcodeScannerSettings?: any;
|
||||
style?: any;
|
||||
}
|
||||
|
||||
const CameraView: React.FC<CameraViewProps> = ({ onBarcodeScanned, barcodeScannerSettings, style }) => {
|
||||
return (
|
||||
<View style={style}>
|
||||
<CameraView
|
||||
style={StyleSheet.absoluteFillObject}
|
||||
onBarcodeScanned={onBarcodeScanned}
|
||||
barcodeScannerSettings={barcodeScannerSettings}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default CameraView;
|
||||
Reference in New Issue
Block a user