Skip to content

Commit d6fa4d4

Browse files
justin808claude
andcommitted
Revert unnecessary react-intl pattern changes in CommentForm
The original pattern `const { formatMessage } = this.props.intl;` was already correct and more concise. Reverting to the simpler one-line destructuring pattern while keeping the empty braces removal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c3ed3ac commit d6fa4d4

File tree

1 file changed

+4
-8
lines changed
  • client/app/bundles/comments/components/CommentBox/CommentForm

1 file changed

+4
-8
lines changed

client/app/bundles/comments/components/CommentBox/CommentForm/CommentForm.jsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ class CommentForm extends BaseComponent {
101101
}
102102

103103
formHorizontal() {
104-
const { intl } = this.props;
105-
const { formatMessage } = intl;
104+
const { formatMessage } = this.props.intl;
106105
return (
107106
<div>
108107
<hr />
@@ -157,8 +156,7 @@ class CommentForm extends BaseComponent {
157156
}
158157

159158
formStacked() {
160-
const { intl } = this.props;
161-
const { formatMessage } = intl;
159+
const { formatMessage } = this.props.intl;
162160
return (
163161
<div>
164162
<hr />
@@ -213,8 +211,7 @@ class CommentForm extends BaseComponent {
213211

214212
// Head up! We have some CSS modules going on here with the className props below.
215213
formInline() {
216-
const { intl } = this.props;
217-
const { formatMessage } = intl;
214+
const { formatMessage } = this.props.intl;
218215
return (
219216
<div>
220217
<hr />
@@ -317,8 +314,7 @@ class CommentForm extends BaseComponent {
317314
throw new Error(`Unknown form mode: ${this.state.formMode}.`);
318315
}
319316

320-
const { intl } = this.props;
321-
const { formatMessage } = intl;
317+
const { formatMessage } = this.props.intl;
322318

323319
// For animation with TransitionGroup
324320
// https://reactcommunity.org/react-transition-group/transition-group

0 commit comments

Comments
 (0)