From 431c03d8aa66bfd285a662675aa9955053bc9ca4 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Thu, 17 Oct 2024 20:02:42 +0530 Subject: Added some styling to the camera section --- src/screens/ProductScannerScreen.js | 62 ++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/src/screens/ProductScannerScreen.js b/src/screens/ProductScannerScreen.js index 35926e1..7cead47 100644 --- a/src/screens/ProductScannerScreen.js +++ b/src/screens/ProductScannerScreen.js @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { View, Text, Button } from 'react-native'; +import { View, Text, Button, StyleSheet, Alert } from 'react-native'; import BarcodeScanner from '../components/BarcodeScanner'; const ProductScannerScreen = ({ navigation }) => { @@ -8,17 +8,21 @@ const ProductScannerScreen = ({ navigation }) => { const handleScan = (product) => setScannedProduct(product); const handleAddToCart = () => { - // Add product to cart and navigate to cart screen navigation.navigate('Cart'); }; return ( - - + + Scan a Product + + + + + {scannedProduct && ( - - {scannedProduct.name} - {scannedProduct.price} + + {scannedProduct.name} + ${scannedProduct.price}