diff --git a/client/src/app/modals/keyboard-shortcuts/KeyboardShortcutsModal.js b/client/src/app/modals/keyboard-shortcuts/KeyboardShortcutsModal.js index 79148169bd..c7f7daab62 100644 --- a/client/src/app/modals/keyboard-shortcuts/KeyboardShortcutsModal.js +++ b/client/src/app/modals/keyboard-shortcuts/KeyboardShortcutsModal.js @@ -5,28 +5,16 @@ import View from './View'; import getShortcuts from './getShortcuts'; class KeyboardShortcutsModal extends PureComponent { - constructor(props) { - super(props); - - this.state = {}; + getModifierKey() { + return this.props.isMac ? 'Command' : 'Control'; } render() { - - const { - isMac, - onClose, - } = this.props; - - let modifierKey = 'Control'; - - if (isMac) { - modifierKey = 'Command'; - } + const modifierKey = this.getModifierKey(); return ; } } diff --git a/client/src/app/modals/keyboard-shortcuts/View.js b/client/src/app/modals/keyboard-shortcuts/View.js index 4d3f39391a..4b98b42d15 100644 --- a/client/src/app/modals/keyboard-shortcuts/View.js +++ b/client/src/app/modals/keyboard-shortcuts/View.js @@ -8,13 +8,6 @@ import css from './View.less'; class View extends PureComponent { - - constructor(props) { - super(props); - - this.state = {}; - } - render() { const { shortcuts,