feat: add item tooltips to match history

This commit is contained in:
dahyeon committed 2026-06-26 23:07:06 -07:00
1 parent 38c2d1f1b4
commit 68afaf0cb8
8 files changed
+477 -49

No files matched your search

+11 -14
View File
@@ -17,7 +17,6 @@ import { DEFAULT_COMMUNITY_ID } from "../config";
import {
championDisplayName,
championIconUrl,
itemIconUrl,
runeIconUrl,
runeKeystoneIconUrl,
runeStyleIconUrl,
@@ -33,6 +32,7 @@ import {
internalMatchGamePath,
} from "../lib/internal-match-routes";
import { LANE_LABELS } from "../lib/riot-history";
import { ItemIcon } from "../components/ItemTooltip";
type MatchGameDetail = ApiInternalMatchDetailResponse["games"][number];
type MatchGameTeam = MatchGameDetail["teams"][number];
@@ -382,19 +382,16 @@ function ItemStrip({
return (
<div className="grid grid-cols-7 gap-0.5">
{itemIds.map((itemId, index) => {
const icon = itemIconUrl(manifest, itemId);
return (
<span
key={`${itemId}-${index}`}
className="h-8 w-8 overflow-hidden border border-base-content/5 bg-base-content/10"
>
{icon ? (
<img src={icon} alt="" className="h-full w-full object-cover" />
) : null}
</span>
);
})}
{itemIds.map((itemId, index) => (
<ItemIcon
key={`${itemId}-${index}`}
itemId={itemId}
manifest={manifest}
trinket={index === 6}
className="h-8 w-8"
imageClassName=""
/>
))}
</div>
);
}