Skip to content

Commit 6726692

Browse files
committed
fastfix effect
1 parent cba434c commit 6726692

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

screens/AutorizationScreen.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const AutorizationScreen = ({ getToken, token, navigation }) => {
3434
if (isSending) {
3535
try {
3636
await getToken();
37-
showAlert('RESPONSE TOKEN', `${token}`)
3837
} catch (error) {
3938
showAlert('ERROR', error)
4039
} finally {
@@ -45,6 +44,12 @@ const AutorizationScreen = ({ getToken, token, navigation }) => {
4544
getTokenRequest();
4645
}, [isSending]);
4746

47+
useEffect(() => {
48+
if (token) {
49+
showAlert('RESPONSE TOKEN', `${token}`)
50+
}
51+
}, [token]);
52+
4853
return (
4954
<Container behavior="position" contentContainerStyle={{
5055
flex: 1,

0 commit comments

Comments
 (0)