diff --git a/apps/mobile/app/index.tsx b/apps/mobile/app/index.tsx index fdde119..629facf 100644 --- a/apps/mobile/app/index.tsx +++ b/apps/mobile/app/index.tsx @@ -2,10 +2,11 @@ // import { HomeIcon, HomeScreen } from '@acme/feature-home'; import { BarCodeScanner } from 'expo-barcode-scanner'; import { useEffect, useState } from 'react'; -import { StyleSheet, View, Text, Image, Button } from 'react-native'; +import { StyleSheet, View, Text, Image, Button, Linking, Alert } from 'react-native'; export default function App() { const [hasPermission, setHasPermission] = useState(null); const [scanned, setScanned] = useState(false); + const [message, setMessage] = useState('No PIN entered.'); useEffect(() => { const getBarCodeScannerPermissions = async () => { @@ -16,18 +17,53 @@ export default function App() { getBarCodeScannerPermissions(); }, []); - const handleBarCodeScanned = ({ type, data }) => { - setScanned(true); - alert(`Bar code with type ${type} and data ${data} has been scanned!`); - }; - if (hasPermission === null) { - return Requesting for camera permission; + return ( + <> + + Requesting for camera permission +