diff options
author | 2022-05-14 14:51:08 -0500 | |
---|---|---|
committer | 2022-05-14 14:51:08 -0500 | |
commit | 85cb50a20b8f3d7b0c3599fe6baa1d3e3040f0ae (patch) | |
tree | 201f63fd866b1a3e301699661a9383f53a43e65e /src/components/auth/Signup.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/Signup.js')
-rw-r--r-- | src/components/auth/Signup.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/components/auth/Signup.js b/src/components/auth/Signup.js index 1c7b8e247..930b24491 100644 --- a/src/components/auth/Signup.js +++ b/src/components/auth/Signup.js | |||
@@ -73,34 +73,35 @@ class Signup 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 | firstname: { | 80 | firstname: { |
80 | label: this.props.intl.formatMessage(messages.firstnameLabel), | 81 | label: intl.formatMessage(messages.firstnameLabel), |
81 | value: '', | 82 | value: '', |
82 | validators: [required], | 83 | validators: [required], |
83 | }, | 84 | }, |
84 | lastname: { | 85 | lastname: { |
85 | label: this.props.intl.formatMessage(messages.lastnameLabel), | 86 | label: intl.formatMessage(messages.lastnameLabel), |
86 | value: '', | 87 | value: '', |
87 | validators: [required], | 88 | validators: [required], |
88 | }, | 89 | }, |
89 | email: { | 90 | email: { |
90 | label: this.props.intl.formatMessage(messages.emailLabel), | 91 | label: intl.formatMessage(messages.emailLabel), |
91 | value: '', | 92 | value: '', |
92 | validators: [required, email], | 93 | validators: [required, email], |
93 | }, | 94 | }, |
94 | password: { | 95 | password: { |
95 | label: this.props.intl.formatMessage(messages.passwordLabel), | 96 | label: intl.formatMessage(messages.passwordLabel), |
96 | value: '', | 97 | value: '', |
97 | validators: [required, minLength(6)], | 98 | validators: [required, minLength(6)], |
98 | type: 'password', | 99 | type: 'password', |
99 | }, | 100 | }, |
100 | }, | 101 | }, |
101 | }, | 102 | }, |
102 | this.props.intl, | 103 | intl, |
103 | ); | 104 | )})(); |
104 | 105 | ||
105 | submit(e) { | 106 | submit(e) { |
106 | e.preventDefault(); | 107 | e.preventDefault(); |