Skip to content

Commit

Permalink
Fix typos and clear timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy committed Nov 8, 2019
1 parent 81f70e9 commit db20e9f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/mobile/src/verify/VerificationInterstitialScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Namespaces } from 'src/i18n'
import { navigate } from 'src/navigator/NavigationService'
import { Screens } from 'src/navigator/Screens'

const SCREEN_DUARTION = 5000 // 5s
const SCREEN_DURATION = 6000 // 6s

const AnimatedCircle = () => (
<View style={styles.iconContainer}>
Expand All @@ -21,10 +21,16 @@ const AnimatedCircle = () => (
class VerificationInterstitialScreen extends React.Component<WithNamespaces> {
static navigationOptions = null

timeout: number | undefined

componentDidMount() {
setTimeout(() => {
this.timeout = setTimeout(() => {
navigate(Screens.VerificationInputScreen)
}, SCREEN_DUARTION)
}, SCREEN_DURATION)
}

componentWillUnmount() {
clearTimeout(this.timeout)
}

render() {
Expand Down

0 comments on commit db20e9f

Please sign in to comment.