mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-09 02:27:52 +02:00
refactor: Simplify a file.
This commit is contained in:
@@ -5,7 +5,6 @@ import { t, TranslationKeys } from "../i18n";
|
||||
import "./ContextMenu.scss";
|
||||
import {
|
||||
getShortcutFromShortcutName,
|
||||
CustomShortcutName,
|
||||
ShortcutName,
|
||||
} from "../actions/shortcuts";
|
||||
import { Action } from "../actions/types";
|
||||
@@ -117,9 +116,7 @@ export const ContextMenu = React.memo(
|
||||
<div className="context-menu-item__label">{label}</div>
|
||||
<kbd className="context-menu-item__shortcut">
|
||||
{actionName
|
||||
? getShortcutFromShortcutName(
|
||||
actionName as ShortcutName | CustomShortcutName,
|
||||
)
|
||||
? getShortcutFromShortcutName(actionName as ShortcutName)
|
||||
: ""}
|
||||
</kbd>
|
||||
</button>
|
||||
|
Reference in New Issue
Block a user