import React, { useState } from 'react'; import { View, Text, Button, StyleSheet, Alert } from 'react-native'; import BarcodeScanner from '../components/BarcodeScanner'; const ProductScannerScreen = ({ navigation }) => { const [scannedProduct, setScannedProduct] = useState(null); const handleScan = (product) => setScannedProduct(product); const handleAddToCart = () => { navigation.navigate('Cart'); }; return ( Scan a Product {scannedProduct && ( {scannedProduct.name} ${scannedProduct.price}