diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2022-11-02 11:08:39 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-11-02 20:03:01 +0000 |
commit | 2ab6fc273ecbf405f7c126fab11ddc0b9bf516da (patch) | |
tree | a6e005b4f57fb488d3e551b7df52399e69b0674c /server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx | |
parent | 60e4b88e4567c1af3051b6cdc4c8858f8b0fca21 (diff) | |
download | sonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.tar.gz sonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.zip |
SONAR-13368 Bump to prettier@2.7.1
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx b/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx index 15c6672a055..a7693d6e4d3 100644 --- a/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx +++ b/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx @@ -40,8 +40,8 @@ const CATEGORIES: { left: Shortcuts; right: Shortcuts } = { category: 'global', shortcuts: [ { keys: ['s'], action: 'search' }, - { keys: ['?'], action: 'open_shortcuts' } - ] + { keys: ['?'], action: 'open_shortcuts' }, + ], }, { category: 'issues_page', @@ -57,9 +57,9 @@ const CATEGORIES: { left: Shortcuts; right: Shortcuts } = { { keys: ['i'], action: 'severity' }, { keys: ['c'], action: 'comment' }, { keys: ['ctrl', '+', 'enter'], action: 'submit_comment' }, - { keys: ['t'], action: 'tags' } - ] - } + { keys: ['t'], action: 'tags' }, + ], + }, ], right: [ { @@ -67,26 +67,26 @@ const CATEGORIES: { left: Shortcuts; right: Shortcuts } = { shortcuts: [ { keys: ['↑', '↓'], action: 'select_files' }, { keys: ['→'], action: 'open_file' }, - { keys: ['←'], action: 'back' } - ] + { keys: ['←'], action: 'back' }, + ], }, { category: 'measures_page', shortcuts: [ { keys: ['↑', '↓'], action: 'select_files' }, { keys: ['→'], action: 'open_file' }, - { keys: ['←'], action: 'back' } - ] + { keys: ['←'], action: 'back' }, + ], }, { category: 'rules_page', shortcuts: [ { keys: ['↑', '↓'], action: 'navigate' }, { keys: ['→'], action: 'rule_details' }, - { keys: ['←'], action: 'back' } - ] - } - ] + { keys: ['←'], action: 'back' }, + ], + }, + ], }; function renderShortcuts(list: Shortcuts) { @@ -106,7 +106,7 @@ function renderShortcuts(list: Shortcuts) { {shortcuts.map(({ action, keys }) => ( <tr key={action}> <td> - {keys.map(k => + {keys.map((k) => k === '+' ? ( <span key={k} className="little-spacer-right"> {k} @@ -143,7 +143,7 @@ export default function KeyboardShortcutsModal() { } if (event.key === KeyboardKeys.KeyQuestionMark) { - setDisplay(d => !d); + setDisplay((d) => !d); } }; @@ -169,7 +169,8 @@ export default function KeyboardShortcutsModal() { onClick={() => { setDisplay(false); return true; - }}> + }} + > {translate('keyboard_shortcuts.disable_link')} </Link> </div> |