Skip to content
This repository was archived by the owner on Jul 31, 2026. It is now read-only.

Commit d6b1038

Browse files
alx-xoclaude
andcommitted
fix: use stable compound keys in KeyHint fragment maps
key={modifier} / key={key} would collide if the same value appeared twice in the array; key={value-index} guarantees uniqueness. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent af81995 commit d6b1038

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/KeyHint/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function KeyHintKeys({ modifiers, keys }: KeyHintItemProps) {
4747
return (
4848
<div className="flex flex-row items-center gap-1">
4949
{modifiers.map((modifier, index) => (
50-
<React.Fragment key={modifier}>
50+
<React.Fragment key={`${modifier}-${index}`}>
5151
<Key value={modifierMap[modifier]} />
5252
{index < modifiers.length - 1 && (
5353
<span className="text-sm text-body-muted">+</span>
@@ -56,7 +56,7 @@ function KeyHintKeys({ modifiers, keys }: KeyHintItemProps) {
5656
))}
5757
{keys.length > 0 && <span className="text-sm text-body-muted">+</span>}
5858
{keys.map((key, index) => (
59-
<React.Fragment key={key}>
59+
<React.Fragment key={`${key}-${index}`}>
6060
<Key value={key.toUpperCase()} />
6161
{index < keys.length - 1 && (
6262
<span className="text-sm text-body-muted">+</span>

0 commit comments

Comments
 (0)