fix: keys

This commit is contained in:
tresabhi committed 2026-05-05 18:11:49 -05:00
1 parent 16c77f587a
commit 8bda4a5331
2 files changed
+9 -8

No files matched your search

@@ -1,5 +1,6 @@
import type { UpgradeLine } from "@blitzkit/closed/protos/game/proto/legacy/blitz_static_tank_upgrade_line"; import type { UpgradeLine } from "@blitzkit/closed/protos/game/proto/legacy/blitz_static_tank_upgrade_line";
import { CaretDownIcon } from "@radix-ui/react-icons"; import { CaretDownIcon } from "@radix-ui/react-icons";
import { Fragment } from "react";
import { api } from "../../core/api/dynamic"; import { api } from "../../core/api/dynamic";
import { useAwait } from "../../hooks/useAwait"; import { useAwait } from "../../hooks/useAwait";
import { useStrings } from "../../hooks/useStrings"; import { useStrings } from "../../hooks/useStrings";
@@ -21,7 +22,7 @@ export function TankopediaLoadout() {
<div className={styles.lines}> <div className={styles.lines}>
{tank.tank!.upgrade_lines.map((line) => ( {tank.tank!.upgrade_lines.map((line) => (
<Line line={line} /> <Line key={line.name} line={line} />
))} ))}
</div> </div>
</Section> </Section>
@@ -43,7 +44,7 @@ function Line({ line }: LineProps) {
const isSelected = upgrades[line.name] === index; const isSelected = upgrades[line.name] === index;
return ( return (
<> <Fragment key={stage.tech_name}>
{index !== 0 && <CaretDownIcon width="1em" height="1em" />} {index !== 0 && <CaretDownIcon width="1em" height="1em" />}
<IconButton <IconButton
@@ -105,7 +106,7 @@ function Line({ line }: LineProps) {
{/* {stage.grade} */} {/* {stage.grade} */}
{/* {stage.number} */} {/* {stage.number} */}
</IconButton> </IconButton>
</> </Fragment>
); );
})} })}
</div> </div>
@@ -1,4 +1,4 @@
import { useMemo } from "react"; import { Fragment, useMemo } from "react";
import { TankopediaLoadout } from "../../../../components/TankopediaLoadout"; import { TankopediaLoadout } from "../../../../components/TankopediaLoadout";
import { api } from "../../../../core/api/dynamic"; import { api } from "../../../../core/api/dynamic";
import { characteristicsOrder } from "../../../../core/tankopedia/characteristicsOrder"; import { characteristicsOrder } from "../../../../core/tankopedia/characteristicsOrder";
@@ -152,12 +152,12 @@ function Content() {
{characteristicsOrder.map((group) => { {characteristicsOrder.map((group) => {
return ( return (
<> <Fragment key={group.group}>
<h3>{group.group}</h3> <h3>{group.group}</h3>
{group.order.map((item) => { {group.order.map((item) => {
if ("toy" in item) { if ("toy" in item) {
return <span>toy: {item.toy}</span>; return <span key={`toy-${item.toy}`}>toy: {item.toy}</span>;
} }
const value = characteristics[item.name]; const value = characteristics[item.name];
@@ -165,12 +165,12 @@ function Content() {
if (value == null) return null; if (value == null) return null;
return ( return (
<span> <span key={`characteristic-${item.name}`}>
{item.name}: {renderCharacteristic(value, item)} {item.name}: {renderCharacteristic(value, item)}
</span> </span>
); );
})} })}
</> </Fragment>
); );
})} })}
</> </>