Fix hotkey react keys

This commit is contained in:
Gregory Schier
2024-06-10 22:29:06 -07:00
parent 6215914212
commit 32a28a3170

View File

@@ -1,5 +1,5 @@
import classNames from 'classnames';
import React from 'react';
import React, { Fragment } from 'react';
import type { HotkeyAction } from '../../hooks/useHotKey';
import { HotKey } from './HotKey';
import { HotKeyLabel } from './HotKeyLabel';
@@ -15,10 +15,10 @@ export const HotKeyList = ({ hotkeys, bottomSlot, className }: Props) => {
<div className={classNames(className, 'h-full flex items-center justify-center')}>
<div className="px-4 grid gap-2 grid-cols-[auto_auto]">
{hotkeys.map((hotkey) => (
<>
<Fragment key={hotkey}>
<HotKeyLabel className="truncate" action={hotkey} />
<HotKey className="ml-4" action={hotkey} />
</>
</Fragment>
))}
{bottomSlot}
</div>