diff --git a/src/components/Drawer.js b/src/components/Drawer.js index 3e96bf3..fc65f34 100644 --- a/src/components/Drawer.js +++ b/src/components/Drawer.js @@ -232,7 +232,10 @@ const Drawer = ({ position, setBoxPosition, user, mobile, theme }) => { ), {}, ]} - onPress={() => navigation.navigate(route.route)} + onPress={() => { + navigation.push(route.route); + setBoxPosition(); + }} > {route.icon} setValue(value)} /> { +const Home = ({ route, blogs, books, userProducts, mobile }) => { const [position, setPosition] = useState("100%"); const navigation = useNavigation(); @@ -36,6 +36,10 @@ const Home = ({ blogs, books, userProducts, mobile }) => { setPosition(position === "100%" ? "0%" : "100%"); }; + useEffect(() => { + console.log('route has been changed'); + },[route]); + return ( 0 + (minute > 0 ? (minute.toString().length === 1 ? "0" + minute.toString() : minute) + "" - : "") + + : "00") + " " + ":" + " " + - (hour.toString().length === 1 ? "0" + hour.toString() : hour) + (hour > 0 ? hour.toString().length === 1 ? "0" + hour.toString() : hour : "00") ); }, [props.route] @@ -147,7 +147,7 @@ function Otp(props) { const submitCellphone = React.useCallback(() => { setTimeEnd(false); - setTime(120); + setTime(60); setFirstCode(""); setSecondCode(""); setThirdCode(""); @@ -181,7 +181,7 @@ function Otp(props) { xmlnsXlink="http://www.w3.org/1999/xlink" width={58.644} height={86.908} - style={{ transform: [{ translateY: -height / 10 }] }} + style={{ transform: [{ translateY: -height / 20 }] }} > { setScanned(true); - if (page === "activation") { + if (route?.params?.page === "activation") { navigation.push("QRContent", { data }); }else{ navigation.push("Activation", { data }); @@ -45,13 +44,6 @@ function Scan({ theme, route }) { [route, scanned] ); - if (hasPermission === null) { - return Requesting for camera permission; - } - if (hasPermission === false) { - return No access to camera; - } - return ( { tw("flex-1 py-3 flex flex-row justify-center"), { backgroundColor: active - ? Colors.theme1[theme].blueFF1 + ? Colors.theme1[theme].green79 + '11' : "transparent", }, ]}