From c80544b2c86a482554b0eef114672c257394b7b0 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Tue, 12 Apr 2022 18:37:25 +0430 Subject: [PATCH] reza fixed compo colors before QRContent --- src/screens/QR/Scan/index.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/screens/QR/Scan/index.js b/src/screens/QR/Scan/index.js index ee6658d..32ec279 100644 --- a/src/screens/QR/Scan/index.js +++ b/src/screens/QR/Scan/index.js @@ -6,11 +6,11 @@ import { Dimensions, ImageBackground, StatusBar, - Appearance, } from "react-native"; import { useNavigation } from "@react-navigation/native"; import { BarCodeScanner } from "expo-barcode-scanner"; import { Entypo } from "@expo/vector-icons"; +import {connect} from "react-redux"; import tw from "tailwind-rn"; import Colors from "../../../constants/Colors"; @@ -20,8 +20,7 @@ const { width, height } = Dimensions.get("screen"); //assets import laptopImage from "../assets/laptop.png"; -export default function Scan({}) { - const colorScheme = Appearance.getColorScheme(); +function Scan({}) { const navigation = useNavigation(); const [hasPermission, setHasPermission] = useState(null); const [scanned, setScanned] = useState(false); @@ -96,4 +95,10 @@ export default function Scan({}) { {/* )} */} ); -} \ No newline at end of file +} + +const mapStateToProps = (state) => ({ + theme: state.publicApi.theme +}) + +export default connect(mapStateToProps)(Scan); \ No newline at end of file