aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/LockedScreen.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/auth/LockedScreen.tsx')
-rw-r--r--src/containers/auth/LockedScreen.tsx19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/containers/auth/LockedScreen.tsx b/src/containers/auth/LockedScreen.tsx
index 611a0757c..a4cb43f73 100644
--- a/src/containers/auth/LockedScreen.tsx
+++ b/src/containers/auth/LockedScreen.tsx
@@ -12,16 +12,19 @@ interface IProps {
12 stores?: RealStores; 12 stores?: RealStores;
13} 13}
14 14
15interface IState {
16 error: boolean;
17}
18
15@inject('stores', 'actions') 19@inject('stores', 'actions')
16@observer 20@observer
17class LockedScreen extends Component<IProps> { 21class LockedScreen extends Component<IProps, IState> {
18 state = {
19 error: false,
20 };
21
22 constructor(props: StoresProps) { 22 constructor(props: StoresProps) {
23 super(props); 23 super(props);
24 24
25 this.state = {
26 error: false,
27 };
25 this.onSubmit = this.onSubmit.bind(this); 28 this.onSubmit = this.onSubmit.bind(this);
26 this.unlock = this.unlock.bind(this); 29 this.unlock = this.unlock.bind(this);
27 } 30 }
@@ -43,9 +46,7 @@ class LockedScreen extends Component<IProps> {
43 }); 46 });
44 } else { 47 } else {
45 this.setState({ 48 this.setState({
46 error: { 49 error: true,
47 code: 'invalid-credentials',
48 },
49 }); 50 });
50 } 51 }
51 } 52 }
@@ -71,7 +72,7 @@ class LockedScreen extends Component<IProps> {
71 unlock={this.unlock} 72 unlock={this.unlock}
72 useTouchIdToUnlock={useTouchIdToUnlock} 73 useTouchIdToUnlock={useTouchIdToUnlock}
73 isSubmitting={stores!.user.loginRequest.isExecuting} 74 isSubmitting={stores!.user.loginRequest.isExecuting}
74 error={this.state.error || {}} 75 error={this.state.error}
75 /> 76 />
76 </div> 77 </div>
77 </div> 78 </div>