Skip to content

Commit 3780a18

Browse files
Fix: mapping duplicate key error
1 parent 2104c29 commit 3780a18

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/features/Header/IdentityKey.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import styles from "./identityKey.module.css";
99
import PeerIcon from "../../components/PeerIcon";
1010
import { myStakePctAtom, myStakeAmountAtom } from "../../atoms";
1111
import type { PropsWithChildren } from "react";
12-
import { useEffect } from "react";
12+
import { Fragment, useEffect } from "react";
1313
import { DateTime } from "luxon";
1414
import { slowDateTimeNow, getSolString, getDurationValues } from "../../utils";
1515
import { formatNumber } from "../../numUtils";
@@ -246,12 +246,14 @@ function StartupTime() {
246246

247247
return (
248248
<Label label="Uptime">
249-
{values?.map(([value, suffix], i) => (
250-
<>
251-
{i !== 0 && "\xa0"}
252-
<ValueWithSuffix key={i} value={value} suffix={suffix} excludeSpace />
253-
</>
254-
))}
249+
{values?.map(([value, suffix], i) => {
250+
return (
251+
<Fragment key={`${value}${suffix}`}>
252+
{i !== 0 && "\xa0"}
253+
<ValueWithSuffix value={value} suffix={suffix} excludeSpace />
254+
</Fragment>
255+
);
256+
})}
255257
</Label>
256258
);
257259
}

0 commit comments

Comments
 (0)