Skip to content

Commit 7436a59

Browse files
committed
feat(ui-components): address other copilot stuff
1 parent fb29316 commit 7436a59

File tree

1 file changed

+6
-4
lines changed
  • packages/ui-components/Common/ChangeHistory

1 file changed

+6
-4
lines changed

packages/ui-components/Common/ChangeHistory/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ChangeHistory: FC<ChangeHistoryProps> = ({
1717
label = 'History',
1818
changes = [],
1919
align = 'right',
20-
className,
20+
className = '',
2121
'aria-label': ariaLabel = label,
2222
...props
2323
}) => (
@@ -37,7 +37,7 @@ const ChangeHistory: FC<ChangeHistoryProps> = ({
3737
aria-label={ariaLabel}
3838
>
3939
<div className={styles.dropdownContentInner}>
40-
{changes.map((change, index) => {
40+
{changes.map(change => {
4141
const content = (
4242
<>
4343
<div className={styles.dropdownLabel}>{change.label}</div>
@@ -47,12 +47,14 @@ const ChangeHistory: FC<ChangeHistoryProps> = ({
4747
</>
4848
);
4949

50+
const ariaLabel = `${change.label}: ${change.versions.join(', ')}`;
51+
5052
const itemProps = {
51-
key: index,
53+
key: ariaLabel,
5254
className: styles.dropdownItem,
5355
role: 'menuitem',
5456
tabIndex: 0,
55-
['aria-label']: `${change.label}: ${change.versions.join(', ')}`,
57+
['aria-label']: ariaLabel,
5658
};
5759

5860
return change.url ? (

0 commit comments

Comments
 (0)