Refactor user detail page: split components, unify formatters
Break the 615-line UserDetail.tsx into focused sub-components (header, stat cards, activity chart, request history, open alerts) and extract shared utilities to lib/ (format, userChart, enrichRequests). Promote storage load (GB/hr) to a stat card and collapse the chart UX to a single metric picker. Add server-wide average reference line alongside the user's own on every metric, and link request titles to their Seerr pages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export default function RankChip({
|
||||
rank,
|
||||
total,
|
||||
}: {
|
||||
rank: number | null;
|
||||
total: number;
|
||||
}) {
|
||||
if (rank === null) return <span className="text-slate-700">—</span>;
|
||||
return (
|
||||
<span className="text-xs font-mono text-slate-500">
|
||||
#{rank}
|
||||
<span className="text-slate-700">/{total}</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user