refactor: Simplify a file.
This commit is contained in:
parent
fd9a172da9
commit
1bd86942f3
@ -5,7 +5,6 @@ import { t, TranslationKeys } from "../i18n";
|
|||||||
import "./ContextMenu.scss";
|
import "./ContextMenu.scss";
|
||||||
import {
|
import {
|
||||||
getShortcutFromShortcutName,
|
getShortcutFromShortcutName,
|
||||||
CustomShortcutName,
|
|
||||||
ShortcutName,
|
ShortcutName,
|
||||||
} from "../actions/shortcuts";
|
} from "../actions/shortcuts";
|
||||||
import { Action } from "../actions/types";
|
import { Action } from "../actions/types";
|
||||||
@ -117,9 +116,7 @@ export const ContextMenu = React.memo(
|
|||||||
<div className="context-menu-item__label">{label}</div>
|
<div className="context-menu-item__label">{label}</div>
|
||||||
<kbd className="context-menu-item__shortcut">
|
<kbd className="context-menu-item__shortcut">
|
||||||
{actionName
|
{actionName
|
||||||
? getShortcutFromShortcutName(
|
? getShortcutFromShortcutName(actionName as ShortcutName)
|
||||||
actionName as ShortcutName | CustomShortcutName,
|
|
||||||
)
|
|
||||||
: ""}
|
: ""}
|
||||||
</kbd>
|
</kbd>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user