feat: add item tooltips to match history
This commit is contained in:
1 parent
38c2d1f1b4
commit
68afaf0cb8
8 files changed
+477
-49
No files matched your search
@@ -29,7 +29,6 @@ import { ApiError } from "../lib/api";
|
||||
import {
|
||||
championDisplayName,
|
||||
championIconUrl,
|
||||
itemIconUrl,
|
||||
profileIconUrl,
|
||||
runeKeystoneIconUrl,
|
||||
runeStyleIconUrl,
|
||||
@@ -43,6 +42,7 @@ import {
|
||||
RANK_FILTER_TABS,
|
||||
} from "../lib/riot-history";
|
||||
import { ResponsiveTierLabel } from "../components/RankBadge";
|
||||
import { ItemIcon } from "../components/ItemTooltip";
|
||||
// recharts가 무거워 메인 번들에서 분리한다 (전적 페이지에서만 로드).
|
||||
const TierHistoryChart = lazy(() => import("../components/TierHistoryChart"));
|
||||
|
||||
@@ -344,24 +344,16 @@ function ItemGrid({
|
||||
|
||||
return (
|
||||
<div className={`grid gap-1 ${layoutClass}`}>
|
||||
{slots.map((itemId, index) => {
|
||||
const url = itemIconUrl(manifest, itemId);
|
||||
return (
|
||||
<div
|
||||
key={`${itemKey}-item-${index}`}
|
||||
className="w-5 h-5 bg-base-content/8 overflow-hidden border border-base-content/5"
|
||||
>
|
||||
{url ? (
|
||||
<img
|
||||
src={url}
|
||||
alt=""
|
||||
className="w-full h-full object-cover"
|
||||
loading="lazy"
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
{slots.map((itemId, index) => (
|
||||
<ItemIcon
|
||||
key={`${itemKey}-item-${index}`}
|
||||
itemId={itemId}
|
||||
manifest={manifest}
|
||||
trinket={index === 6}
|
||||
className="h-5 w-5"
|
||||
imageClassName=""
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user