diff options
author | 2022-11-02 06:31:36 +0530 | |
---|---|---|
committer | 2022-11-02 01:01:36 +0000 | |
commit | 302d595f7c289387e53a0ef7df4d574ed4e25d70 (patch) | |
tree | 2385e59eaca9c78921d9b0b3681cfba1b3eef168 /src/containers/auth/LockedScreen.tsx | |
parent | Re-enable editing of the address bar to manually access a different url withi... (diff) | |
download | ferdium-app-302d595f7c289387e53a0ef7df4d574ed4e25d70.tar.gz ferdium-app-302d595f7c289387e53a0ef7df4d574ed4e25d70.tar.zst ferdium-app-302d595f7c289387e53a0ef7df4d574ed4e25d70.zip |
Transform to TS and refactored components w.r.t deletion if duplicated Input component (#729)
Diffstat (limited to 'src/containers/auth/LockedScreen.tsx')
-rw-r--r-- | src/containers/auth/LockedScreen.tsx | 19 |
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 | ||
15 | interface IState { | ||
16 | error: boolean; | ||
17 | } | ||
18 | |||
15 | @inject('stores', 'actions') | 19 | @inject('stores', 'actions') |
16 | @observer | 20 | @observer |
17 | class LockedScreen extends Component<IProps> { | 21 | class 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> |