diff --git a/packages/app/src/app/pair-scan.tsx b/packages/app/src/app/pair-scan.tsx index 6d828ddfe..502815d11 100644 --- a/packages/app/src/app/pair-scan.tsx +++ b/packages/app/src/app/pair-scan.tsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useRef, useState } from "react"; +import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { Alert, Pressable, Text, View } from "react-native"; import { useLocalSearchParams, useRouter } from "expo-router"; import { useSafeAreaInsets } from "react-native-safe-area-context"; @@ -203,11 +203,20 @@ export default function PairScanScreen() { void requestPermission(); }, [requestPermission]); + const bodyStyle = useMemo( + () => [styles.body, { paddingBottom: insets.bottom + theme.spacing[6] }], + [insets.bottom, theme.spacing], + ); + const helperTextStyle = useMemo( + () => [styles.helperText, { color: theme.colors.foreground }], + [theme.colors.foreground], + ); + if (isWeb) { return ( - + Not available on web @@ -228,7 +237,7 @@ export default function PairScanScreen() { - + {!granted ? ( Camera permission @@ -244,21 +253,17 @@ export default function PairScanScreen() { - - - - + + + + - {isPairing ? ( - - Pairing… - - ) : null} + {isPairing ? Pairing… : null} )} @@ -266,3 +271,9 @@ export default function PairScanScreen() { ); } + +const BARCODE_SCANNER_SETTINGS = { barcodeTypes: ["qr"] as const }; +const CORNER_TL_STYLE = [styles.corner, styles.cornerTL]; +const CORNER_TR_STYLE = [styles.corner, styles.cornerTR]; +const CORNER_BL_STYLE = [styles.corner, styles.cornerBL]; +const CORNER_BR_STYLE = [styles.corner, styles.cornerBR];