Skip to content

Commit

Permalink
chore(client/keyboard-shortcuts): simplify modal
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac authored and merge-me[bot] committed Jan 22, 2019
1 parent 37e2ba3 commit 1a0968e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
20 changes: 4 additions & 16 deletions client/src/app/modals/keyboard-shortcuts/KeyboardShortcutsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <View
shortcuts={ getShortcuts(modifierKey) }
onClose={ onClose }
onClose={ this.props.onClose }
/>;
}
}
Expand Down
7 changes: 0 additions & 7 deletions client/src/app/modals/keyboard-shortcuts/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import css from './View.less';


class View extends PureComponent {

constructor(props) {
super(props);

this.state = {};
}

render() {
const {
shortcuts,
Expand Down

0 comments on commit 1a0968e

Please sign in to comment.