diff options
author | 2022-06-24 21:25:05 +0200 | |
---|---|---|
committer | 2022-06-25 05:50:00 +0530 | |
commit | 2d71e61e46394d75d9f52ba1f4c273ed6d3c9cfd (patch) | |
tree | 7c0172945f962609637d03e7de885a254dbec8a4 /src/containers/auth/LockedScreen.tsx | |
parent | chore: improve todo menu behaviour on fresh install (#359) (diff) | |
download | ferdium-app-2d71e61e46394d75d9f52ba1f4c273ed6d3c9cfd.tar.gz ferdium-app-2d71e61e46394d75d9f52ba1f4c273ed6d3c9cfd.tar.zst ferdium-app-2d71e61e46394d75d9f52ba1f4c273ed6d3c9cfd.zip |
chore: convert the last few stores to typescript
Diffstat (limited to 'src/containers/auth/LockedScreen.tsx')
-rw-r--r-- | src/containers/auth/LockedScreen.tsx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/containers/auth/LockedScreen.tsx b/src/containers/auth/LockedScreen.tsx index e6bb5e8e4..500bff0d6 100644 --- a/src/containers/auth/LockedScreen.tsx +++ b/src/containers/auth/LockedScreen.tsx | |||
@@ -1,20 +1,20 @@ | |||
1 | import { Component } from 'react'; | 1 | import { Component, ReactElement } from 'react'; |
2 | import { inject, observer } from 'mobx-react'; | 2 | import { inject, observer } from 'mobx-react'; |
3 | import { SettingsStore } from 'src/stores.types'; | ||
3 | import Locked from '../../components/auth/Locked'; | 4 | import Locked from '../../components/auth/Locked'; |
4 | import SettingsStore from '../../stores/SettingsStore'; | ||
5 | 5 | ||
6 | import { hash } from '../../helpers/password-helpers'; | 6 | import { hash } from '../../helpers/password-helpers'; |
7 | import UserStore from '../../stores/UserStore'; | 7 | import UserStore from '../../stores/UserStore'; |
8 | 8 | ||
9 | interface IProps { | 9 | interface IProps { |
10 | actions: { | 10 | actions: { |
11 | settings: SettingsStore, | 11 | settings: SettingsStore; |
12 | }, | 12 | }; |
13 | stores: { | 13 | stores: { |
14 | settings: SettingsStore, | 14 | settings: SettingsStore; |
15 | user: UserStore, | 15 | user: UserStore; |
16 | } | 16 | }; |
17 | }; | 17 | } |
18 | 18 | ||
19 | class LockedScreen extends Component<IProps> { | 19 | class LockedScreen extends Component<IProps> { |
20 | state = { | 20 | state = { |
@@ -28,7 +28,7 @@ class LockedScreen extends Component<IProps> { | |||
28 | this.unlock = this.unlock.bind(this); | 28 | this.unlock = this.unlock.bind(this); |
29 | } | 29 | } |
30 | 30 | ||
31 | onSubmit(values) { | 31 | onSubmit(values): void { |
32 | const { password } = values; | 32 | const { password } = values; |
33 | 33 | ||
34 | let correctPassword = this.props.stores.settings.all.app.lockedPassword; | 34 | let correctPassword = this.props.stores.settings.all.app.lockedPassword; |
@@ -52,7 +52,7 @@ class LockedScreen extends Component<IProps> { | |||
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | unlock() { | 55 | unlock(): void { |
56 | this.props.actions.settings.update({ | 56 | this.props.actions.settings.update({ |
57 | type: 'app', | 57 | type: 'app', |
58 | data: { | 58 | data: { |
@@ -61,7 +61,7 @@ class LockedScreen extends Component<IProps> { | |||
61 | }); | 61 | }); |
62 | } | 62 | } |
63 | 63 | ||
64 | render() { | 64 | render(): ReactElement { |
65 | const { stores } = this.props; | 65 | const { stores } = this.props; |
66 | const { useTouchIdToUnlock } = this.props.stores.settings.all.app; | 66 | const { useTouchIdToUnlock } = this.props.stores.settings.all.app; |
67 | 67 | ||