diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-05-14 14:51:08 -0500 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-05-14 14:51:08 -0500 |
commit | 85cb50a20b8f3d7b0c3599fe6baa1d3e3040f0ae (patch) | |
tree | 201f63fd866b1a3e301699661a9383f53a43e65e /src/components/auth/Password.js | |
parent | Added TODOs for tech debt (diff) | |
download | ferdium-app-85cb50a20b8f3d7b0c3599fe6baa1d3e3040f0ae.tar.gz ferdium-app-85cb50a20b8f3d7b0c3599fe6baa1d3e3040f0ae.tar.zst ferdium-app-85cb50a20b8f3d7b0c3599fe6baa1d3e3040f0ae.zip |
Minor refactoring for aligning on usage of 'intl' package
Diffstat (limited to 'src/components/auth/Password.js')
-rw-r--r-- | src/components/auth/Password.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/auth/Password.js b/src/components/auth/Password.js index 8a5ef28f3..0e87cb028 100644 --- a/src/components/auth/Password.js +++ b/src/components/auth/Password.js | |||
@@ -48,18 +48,19 @@ class Password extends Component { | |||
48 | status: MobxPropTypes.arrayOrObservableArray.isRequired, | 48 | status: MobxPropTypes.arrayOrObservableArray.isRequired, |
49 | }; | 49 | }; |
50 | 50 | ||
51 | form = new Form( | 51 | form = (() => { |
52 | { | 52 | const { intl } = this.props; |
53 | return new Form({ | ||
53 | fields: { | 54 | fields: { |
54 | email: { | 55 | email: { |
55 | label: this.props.intl.formatMessage(messages.emailLabel), | 56 | label: intl.formatMessage(messages.emailLabel), |
56 | value: '', | 57 | value: '', |
57 | validators: [required, email], | 58 | validators: [required, email], |
58 | }, | 59 | }, |
59 | }, | 60 | }, |
60 | }, | 61 | }, |
61 | this.props.intl, | 62 | intl, |
62 | ); | 63 | )})(); |
63 | 64 | ||
64 | submit(e) { | 65 | submit(e) { |
65 | e.preventDefault(); | 66 | e.preventDefault(); |