feat(web): add tier history chart

This commit is contained in:
dahyeon committed 2026-06-07 08:11:43 -07:00
1 parent be5383a2e9
commit c3a3eb46dd
7 files changed
+743 -1

No files matched your search

+13 -1
View File
@@ -1,4 +1,4 @@
import { useState } from "react";
import { lazy, Suspense, useState } from "react";
import { useQueryClient } from "@tanstack/react-query";
import { ChevronDown, ChevronUp } from "lucide-react";
import { Link, useLocation, useParams, useSearchParams } from "react-router";
@@ -43,6 +43,8 @@ import {
QUEUE_GROUP_TABS,
RANK_FILTER_TABS,
} from "../lib/riot-history";
// recharts가 무거워 메인 번들에서 분리한다 (전적 페이지에서만 로드).
const TierHistoryChart = lazy(() => import("../components/TierHistoryChart"));
type ChampionSortKey = "games" | "winRate" | "kda" | "avgCsPerMin";
@@ -1294,6 +1296,16 @@ export default function UserHistoryPage() {
)}
</section>
{profile.tierHistory.length > 0 && (
<Suspense
fallback={
<div className="mb-5 h-[180px] border border-base-content/10 bg-base-100" />
}
>
<TierHistoryChart entries={profile.tierHistory} />
</Suspense>
)}
<section className="border border-base-content/10 bg-base-100 mb-5">
<div className="flex flex-wrap border-b border-base-content/8">
{QUEUE_GROUP_TABS.map((tab) => (