aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth/Login.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-05-14 14:51:08 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-05-14 14:51:08 -0500
commit85cb50a20b8f3d7b0c3599fe6baa1d3e3040f0ae (patch)
tree201f63fd866b1a3e301699661a9383f53a43e65e /src/components/auth/Login.js
parentAdded TODOs for tech debt (diff)
downloadferdium-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/Login.js')
-rw-r--r--src/components/auth/Login.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/components/auth/Login.js b/src/components/auth/Login.js
index d6c9e6feb..f1c58a020 100644
--- a/src/components/auth/Login.js
+++ b/src/components/auth/Login.js
@@ -73,24 +73,25 @@ class Login extends Component {
73 error: globalErrorPropType.isRequired, 73 error: globalErrorPropType.isRequired,
74 }; 74 };
75 75
76 form = new Form( 76 form = (() => {
77 { 77 const { intl } = this.props;
78 return new Form({
78 fields: { 79 fields: {
79 email: { 80 email: {
80 label: this.props.intl.formatMessage(messages.emailLabel), 81 label: intl.formatMessage(messages.emailLabel),
81 value: '', 82 value: '',
82 validators: [required, email], 83 validators: [required, email],
83 }, 84 },
84 password: { 85 password: {
85 label: this.props.intl.formatMessage(messages.passwordLabel), 86 label: intl.formatMessage(messages.passwordLabel),
86 value: '', 87 value: '',
87 validators: [required], 88 validators: [required],
88 type: 'password', 89 type: 'password',
89 }, 90 },
90 }, 91 },
91 }, 92 },
92 this.props.intl, 93 intl,
93 ); 94 )})();
94 95
95 submit(e) { 96 submit(e) {
96 e.preventDefault(); 97 e.preventDefault();