0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-26 22:51:29 -05:00

Fix react warnings on workspace shortcuts panel

This commit is contained in:
Andrey Antukh 2023-05-15 15:44:20 +02:00 committed by Alejandro Alonso
parent ca439cf604
commit 5d8562e072

View file

@ -7,6 +7,7 @@
(ns app.main.ui.workspace.sidebar.shortcuts
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.config :as cf]
[app.main.data.dashboard.shortcuts]
[app.main.data.events :as ev]
@ -224,13 +225,16 @@
(for [chars short-char-list]
[:*
(for [char chars]
[:& converted-chars {:char char :command command}])
[:& converted-chars {:key (dm/str char "-" (name command))
:char char
:command command}])
(when (not= chars penultimate) [:span.space ","])])
(when (not= last-element penultimate)
[:*
[:span.space (tr "shortcuts.or")]
(for [char last-element]
[:& converted-chars {:char char
[:& converted-chars {:key (dm/str char "-" (name command))
:char char
:command command}])])]))
(mf/defc shortcut-row