Update expo, fix barcode scanning

pull/276/head
Ty Fiero 8 months ago
parent 345400c7e4
commit 6b61dc6e73

File diff suppressed because it is too large Load Diff

@ -12,25 +12,25 @@
"dependencies": {
"@react-navigation/native": "^6.1.14",
"@react-navigation/native-stack": "^6.9.22",
"expo": "~50.0.8",
"expo-av": "~13.10.5",
"expo-barcode-scanner": "~12.9.3",
"expo-camera": "~14.0.5",
"expo-haptics": "~12.8.1",
"expo": "~51.0.8",
"expo-av": "~14.0.5",
"expo-barcode-scanner": "~13.0.1",
"expo-camera": "~15.0.9",
"expo-haptics": "~13.0.1",
"expo-permissions": "^14.4.0",
"expo-status-bar": "~1.11.1",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-native": "0.73.4",
"react-native": "0.74.1",
"react-native-base64": "^0.2.1",
"react-native-polyfill-globals": "^3.1.0",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-safe-area-context": "4.10.1",
"react-native-screens": "~3.31.1",
"text-encoding": "^0.7.0",
"zustand": "^4.5.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "~18.2.45",
"@types/react": "~18.2.79",
"@types/react-native-base64": "^0.2.2",
"typescript": "^5.1.3"
},

@ -1,12 +1,13 @@
import React, { useState } from "react";
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { Camera } from "expo-camera";
import { CameraView, useCameraPermissions } from "expo-camera";
import { useNavigation } from "@react-navigation/native";
import { BarCodeScanner } from "expo-barcode-scanner";
// import useSoundEffect from "../lib/useSoundEffect";
export default function CameraScreen() {
const [permission, requestPermission] = Camera.useCameraPermissions();
const [permission, requestPermission] = useCameraPermissions();
// const playYay = useSoundEffect(require("../../assets/yay.wav"));
const [scanned, setScanned] = useState(false);
@ -51,12 +52,12 @@ export default function CameraScreen() {
};
return (
<View style={styles.container}>
<Camera
<CameraView
style={styles.camera}
facing={"back"}
onBarCodeScanned={scanned ? undefined : handleBarCodeScanned}
barCodeScannerSettings={{
barCodeTypes: [BarCodeScanner.Constants.BarCodeType.qr],
onBarcodeScanned={scanned ? undefined : handleBarCodeScanned}
barcodeScannerSettings={{
barcodeTypes: ["qr"],
}}
>
<View style={styles.buttonContainer}>
@ -74,7 +75,7 @@ export default function CameraScreen() {
</TouchableOpacity>
)}
</View>
</Camera>
</CameraView>
</View>
);
}

Loading…
Cancel
Save