mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 19:11:41 +02:00
💄 Add minor cosmetic improvements on dashboard ui component
This commit is contained in:
parent
e5dedb1e3d
commit
5d5d238fec
1 changed files with 11 additions and 11 deletions
|
@ -154,18 +154,18 @@
|
||||||
(hooks/use-shortcuts ::dashboard sc/shortcuts)
|
(hooks/use-shortcuts ::dashboard sc/shortcuts)
|
||||||
|
|
||||||
(mf/with-effect [team-id]
|
(mf/with-effect [team-id]
|
||||||
(st/emit! (dd/initialize {:id team-id})))
|
(st/emit! (dd/initialize {:id team-id}))
|
||||||
|
|
||||||
(mf/use-effect
|
|
||||||
(fn []
|
(fn []
|
||||||
(let [events [(events/listen goog/global "keydown"
|
(dd/finalize {:id team-id})))
|
||||||
|
|
||||||
|
(mf/with-effect []
|
||||||
|
(let [key (events/listen goog/global "keydown"
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(when (kbd/enter? event)
|
(when (kbd/enter? event)
|
||||||
(dom/stop-propagation event)
|
(dom/stop-propagation event)
|
||||||
(st/emit! (dd/open-selected-file)))))]]
|
(st/emit! (dd/open-selected-file)))))]
|
||||||
(fn []
|
(fn []
|
||||||
(doseq [key events]
|
(events/unlistenByKey key))))
|
||||||
(events/unlistenByKey key))))))
|
|
||||||
|
|
||||||
[:& (mf/provider ctx/current-team-id) {:value team-id}
|
[:& (mf/provider ctx/current-team-id) {:value team-id}
|
||||||
[:& (mf/provider ctx/current-project-id) {:value project-id}
|
[:& (mf/provider ctx/current-project-id) {:value project-id}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue