From 95d9c7f73381957038e2ee7fbcd918f7fd89220b Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao <_accounts@nareshkumarrao.com> Date: Tue, 27 Jul 2021 18:23:44 +0200 Subject: [PATCH] add option to login upon scanning qr code --- .gitignore | 1 + src/screens/CreateScreen.js | 3 +++ src/screens/LoginScreen.js | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 834b352..89fb9f3 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +.env.production diff --git a/src/screens/CreateScreen.js b/src/screens/CreateScreen.js index 8dec631..c2fad81 100644 --- a/src/screens/CreateScreen.js +++ b/src/screens/CreateScreen.js @@ -1,5 +1,6 @@ import { Button, + Divider, Flex, FormControl, FormLabel, @@ -82,6 +83,8 @@ function Create() { > Create Account + +
Telegram Username: diff --git a/src/screens/LoginScreen.js b/src/screens/LoginScreen.js index 893cc08..a844cae 100644 --- a/src/screens/LoginScreen.js +++ b/src/screens/LoginScreen.js @@ -57,7 +57,11 @@ function Login() { if (response.data.authorized) { dispatch(authLogin()); toast.closeAll(); - history.push('/home'); + if(response.data.contactSuccess){ + history.push('/success'); + }else{ + history.push('/home'); + } } else { dispatch(authLogout()); toast({