aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar Ricardo Cino <ricardo@cino.io>2022-06-24 21:25:05 +0200
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-06-25 05:50:00 +0530
commit2d71e61e46394d75d9f52ba1f4c273ed6d3c9cfd (patch)
tree7c0172945f962609637d03e7de885a254dbec8a4 /src/containers
parentchore: improve todo menu behaviour on fresh install (#359) (diff)
downloadferdium-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')
-rw-r--r--src/containers/auth/ImportScreen.tsx12
-rw-r--r--src/containers/auth/LockedScreen.tsx22
-rw-r--r--src/containers/auth/PasswordScreen.tsx10
3 files changed, 22 insertions, 22 deletions
diff --git a/src/containers/auth/ImportScreen.tsx b/src/containers/auth/ImportScreen.tsx
index 756a2e59c..8d318cb2d 100644
--- a/src/containers/auth/ImportScreen.tsx
+++ b/src/containers/auth/ImportScreen.tsx
@@ -1,17 +1,17 @@
1import { Component } from 'react'; 1import { Component } from 'react';
2import { inject, observer } from 'mobx-react'; 2import { inject, observer } from 'mobx-react';
3import { RouterStore } from 'mobx-react-router'; 3import { RouterStore } from 'mobx-react-router';
4import { UserStore } from 'src/stores.types';
4import Import from '../../components/auth/Import'; 5import Import from '../../components/auth/Import';
5import UserStore from '../../stores/UserStore';
6 6
7interface IProps { 7interface IProps {
8 actions: { 8 actions: {
9 user: UserStore, 9 user: UserStore;
10 }, 10 };
11 stores: { 11 stores: {
12 user: UserStore, 12 user: UserStore;
13 router: RouterStore, 13 router: RouterStore;
14 } 14 };
15} 15}
16 16
17class ImportScreen extends Component<IProps> { 17class ImportScreen extends Component<IProps> {
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 @@
1import { Component } from 'react'; 1import { Component, ReactElement } from 'react';
2import { inject, observer } from 'mobx-react'; 2import { inject, observer } from 'mobx-react';
3import { SettingsStore } from 'src/stores.types';
3import Locked from '../../components/auth/Locked'; 4import Locked from '../../components/auth/Locked';
4import SettingsStore from '../../stores/SettingsStore';
5 5
6import { hash } from '../../helpers/password-helpers'; 6import { hash } from '../../helpers/password-helpers';
7import UserStore from '../../stores/UserStore'; 7import UserStore from '../../stores/UserStore';
8 8
9interface IProps { 9interface 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
19class LockedScreen extends Component<IProps> { 19class 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
diff --git a/src/containers/auth/PasswordScreen.tsx b/src/containers/auth/PasswordScreen.tsx
index 864a11fa7..d88549712 100644
--- a/src/containers/auth/PasswordScreen.tsx
+++ b/src/containers/auth/PasswordScreen.tsx
@@ -1,15 +1,15 @@
1import { Component } from 'react'; 1import { Component } from 'react';
2import { inject, observer } from 'mobx-react'; 2import { inject, observer } from 'mobx-react';
3import { UserStore } from 'src/stores.types';
3import Password from '../../components/auth/Password'; 4import Password from '../../components/auth/Password';
4import UserStore from '../../stores/UserStore';
5 5
6interface IProps { 6interface IProps {
7 actions: { 7 actions: {
8 user: UserStore, 8 user: UserStore;
9 }, 9 };
10 stores: { 10 stores: {
11 user: UserStore, 11 user: UserStore;
12 } 12 };
13}; 13};
14 14
15class PasswordScreen extends Component<IProps> { 15class PasswordScreen extends Component<IProps> {