From 6e7c86ac5024a1359e57320ded455b6068bd3b84 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Thu, 10 Sep 2020 17:55:06 -0400 Subject: [PATCH] Format --- js/src/forum/components/IndexPage.js | 2 +- js/src/forum/utils/DiscussionControls.js | 34 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/js/src/forum/components/IndexPage.js b/js/src/forum/components/IndexPage.js index 03d5e64a2..22d8eb456 100644 --- a/js/src/forum/components/IndexPage.js +++ b/js/src/forum/components/IndexPage.js @@ -167,7 +167,7 @@ export default class IndexPage extends Page { onclick: () => { // If the user is not logged in, the promise rejects, and a login modal shows up. // Since that's already handled, we dont need to show an error message in the console. - return this.newDiscussionAction().catch(() => { }); + return this.newDiscussionAction().catch(() => {}); }, disabled: !canStartDiscussion, }, diff --git a/js/src/forum/utils/DiscussionControls.js b/js/src/forum/utils/DiscussionControls.js index 4cdc8665b..b496cc484 100644 --- a/js/src/forum/utils/DiscussionControls.js +++ b/js/src/forum/utils/DiscussionControls.js @@ -56,26 +56,26 @@ export default { 'reply', !app.session.user || discussion.canReply() ? Button.component( - { - icon: 'fas fa-reply', - onclick: () => { - // If the user is not logged in, the promise rejects, and a login modal shows up. - // Since that's already handled, we dont need to show an error message in the console. - return this.replyAction(discussion, true, false).catch(() => { }); + { + icon: 'fas fa-reply', + onclick: () => { + // If the user is not logged in, the promise rejects, and a login modal shows up. + // Since that's already handled, we dont need to show an error message in the console. + return this.replyAction(discussion, true, false).catch(() => {}); + }, }, - }, - app.translator.trans( - app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button' + app.translator.trans( + app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button' + ) ) - ) : Button.component( - { - icon: 'fas fa-reply', - className: 'disabled', - title: app.translator.trans('core.forum.discussion_controls.cannot_reply_text'), - }, - app.translator.trans('core.forum.discussion_controls.cannot_reply_button') - ) + { + icon: 'fas fa-reply', + className: 'disabled', + title: app.translator.trans('core.forum.discussion_controls.cannot_reply_text'), + }, + app.translator.trans('core.forum.discussion_controls.cannot_reply_button') + ) ); }