Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-09-26 12:57:21 +08:00
parent 9255533215
commit 8bf4c04f0b
9 changed files with 197 additions and 52 deletions
+1
View File
@@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="referrer" content="no-referrer">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
@@ -38,6 +38,7 @@ export function DashboardSection({
iconMap = {},
linkMap = {},
chartLinkMap = {},
chartHeight = 240,
className = "",
}) {
return (
@@ -57,6 +58,8 @@ export function DashboardSection({
label={b.label}
data={b.data}
onBarClick={chartLinkMap[b.key]}
height={b.height ?? chartHeight}
yAxisWidth={b.yAxisWidth}
/>
) : (
<PieBreakdown
@@ -64,6 +67,7 @@ export function DashboardSection({
label={b.label}
data={b.data}
onSliceClick={chartLinkMap[b.key]}
height={b.height ?? chartHeight}
/>
)
)}
@@ -41,6 +41,7 @@ export function TableDashboard({
breakdowns = [],
statMap = {},
tableRefsRef, // ← remove activeFilters prop entirely
chartHeight = 240,
className = "",
}) {
// ─── Always read live from ref ────────────────────────────────────────────
@@ -124,6 +125,7 @@ export function TableDashboard({
label={b.label}
data={b.data}
onBarClick={b.filterId ? (entry) => handleChartClick(b, entry) : undefined}
height={b.height ?? chartHeight}
/>
) : (
<PieBreakdown
@@ -131,6 +133,7 @@ export function TableDashboard({
label={b.label}
data={b.data}
onSliceClick={b.filterId ? (entry) => handleChartClick(b, entry) : undefined}
height={b.height ?? chartHeight}
/>
)
)}
@@ -155,6 +155,7 @@ export default function UsersTable() {
breakdowns={dashboardBreakdowns}
statMap={USER_STAT_MAP}
tableRefsRef={tableRefsRef}
chartHeight={320}
/>
)}
@@ -50,6 +50,7 @@ export default function ViewUser() {
fetchUserAchievements(userId);
fetchUserActivity(userId, { page: 1, limit: 10 });
fetchUserBans(userId);
window.scrollTo(0, 0);
}, [userId]);
const loadActivityPage = (p) => {