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/Invite.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/Invite.js')
-rw-r--r-- | src/components/auth/Invite.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js index 81618b3bd..84adb320f 100644 --- a/src/components/auth/Invite.js +++ b/src/components/auth/Invite.js | |||
@@ -61,6 +61,7 @@ class Invite extends Component { | |||
61 | state = { showSuccessInfo: false }; | 61 | state = { showSuccessInfo: false }; |
62 | 62 | ||
63 | componentDidMount() { | 63 | componentDidMount() { |
64 | const { intl } = this.props; | ||
64 | this.form = new Form( | 65 | this.form = new Form( |
65 | { | 66 | { |
66 | fields: { | 67 | fields: { |
@@ -68,8 +69,8 @@ class Invite extends Component { | |||
68 | ...Array.from({ length: 3 }).fill({ | 69 | ...Array.from({ length: 3 }).fill({ |
69 | fields: { | 70 | fields: { |
70 | name: { | 71 | name: { |
71 | label: this.props.intl.formatMessage(messages.nameLabel), | 72 | label: intl.formatMessage(messages.nameLabel), |
72 | placeholder: this.props.intl.formatMessage( | 73 | placeholder: intl.formatMessage( |
73 | messages.nameLabel, | 74 | messages.nameLabel, |
74 | ), | 75 | ), |
75 | onChange: () => { | 76 | onChange: () => { |
@@ -78,8 +79,8 @@ class Invite extends Component { | |||
78 | // related: ['invite.0.email'], // path accepted but does not work | 79 | // related: ['invite.0.email'], // path accepted but does not work |
79 | }, | 80 | }, |
80 | email: { | 81 | email: { |
81 | label: this.props.intl.formatMessage(messages.emailLabel), | 82 | label: intl.formatMessage(messages.emailLabel), |
82 | placeholder: this.props.intl.formatMessage( | 83 | placeholder: intl.formatMessage( |
83 | messages.emailLabel, | 84 | messages.emailLabel, |
84 | ), | 85 | ), |
85 | onChange: () => { | 86 | onChange: () => { |
@@ -92,7 +93,7 @@ class Invite extends Component { | |||
92 | ], | 93 | ], |
93 | }, | 94 | }, |
94 | }, | 95 | }, |
95 | this.props.intl, | 96 | intl, |
96 | ); | 97 | ); |
97 | 98 | ||
98 | document.querySelector('input:first-child')?.focus(); | 99 | document.querySelector('input:first-child')?.focus(); |
@@ -185,7 +186,7 @@ class Invite extends Component { | |||
185 | > | 186 | > |
186 | {embed && ( | 187 | {embed && ( |
187 | <div className="settings__header"> | 188 | <div className="settings__header"> |
188 | <H1>{this.props.intl.formatMessage(messages.settingsHeadline)}</H1> | 189 | <H1>{intl.formatMessage(messages.settingsHeadline)}</H1> |
189 | </div> | 190 | </div> |
190 | )} | 191 | )} |
191 | {!embed ? ( | 192 | {!embed ? ( |