animate login spinner
This commit is contained in:
+2
-1
@@ -312,5 +312,6 @@
|
|||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*{.js,.jsx,.ts,.tsx}": "yarn eslint --fix"
|
"*{.js,.jsx,.ts,.tsx}": "yarn eslint --fix"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React, {useState, useRef} from 'react'
|
|||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Keyboard,
|
Keyboard,
|
||||||
|
LayoutAnimation,
|
||||||
TextInput,
|
TextInput,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
@@ -67,6 +68,7 @@ export const LoginForm = ({
|
|||||||
const onPressNext = async () => {
|
const onPressNext = async () => {
|
||||||
if (isProcessing) return
|
if (isProcessing) return
|
||||||
Keyboard.dismiss()
|
Keyboard.dismiss()
|
||||||
|
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
|
||||||
setError('')
|
setError('')
|
||||||
setIsProcessing(true)
|
setIsProcessing(true)
|
||||||
|
|
||||||
@@ -101,6 +103,7 @@ export const LoginForm = ({
|
|||||||
})
|
})
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
const errMsg = e.toString()
|
const errMsg = e.toString()
|
||||||
|
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
|
||||||
setIsProcessing(false)
|
setIsProcessing(false)
|
||||||
if (errMsg.includes('Authentication Required')) {
|
if (errMsg.includes('Authentication Required')) {
|
||||||
logger.debug('Failed to login due to invalid credentials', {
|
logger.debug('Failed to login due to invalid credentials', {
|
||||||
|
|||||||
Reference in New Issue
Block a user