diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index 1822bc6..fc62fd5 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -3,9 +3,7 @@ import { Banner, Button, Card, - Input, Spin, - Table, Tag, Toast, Tooltip, @@ -14,9 +12,7 @@ import { BarChart3, CalendarDays, Clock3, - Layers3, RefreshCw, - Search, Send, ShieldCheck, } from "lucide-react"; @@ -24,14 +20,6 @@ import { api, post } from "../api"; import type { Account, Job } from "../types"; import "./home.css"; -type PyramidRow = { - region: string; - delay: number; - category_id: string; - category_name: string; - value: number | null; -}; -type PyramidSnapshot = { items: PyramidRow[]; fetched_at: string }; type ActivityDay = { date: string; count: number | null }; type ActivitySnapshot = { items: ActivityDay[]; @@ -108,7 +96,6 @@ export function HomePage({ const [sending, setSending] = useState(false); const [verificationId, setVerificationId] = useState(null); const [verificationError, setVerificationError] = useState(""); - const [search, setSearch] = useState(""); useEffect(() => { const timer = window.setInterval(() => setNow(new Date()), 1000); return () => clearInterval(timer); @@ -128,11 +115,6 @@ export function HomePage({ connected, revision, ); - const multipliers = useResource( - "/dashboard/pyramid-multipliers", - connected, - revision, - ); const verification = jobs.find((job) => job.id === verificationId); const authRunning = jobs.some( (job) => @@ -166,21 +148,6 @@ export function HomePage({ setSending(false); } } - const eligible = (multipliers.data?.items ?? []) - .filter((row) => row.value !== null && row.value > 1) - .sort( - (a, b) => - b.value! - a.value! || - a.region.localeCompare(b.region) || - a.delay - b.delay || - a.category_id.localeCompare(b.category_id), - ); - const query = search.trim().toLowerCase(); - const rows = eligible.filter((row) => - `${row.region} D${row.delay} ${row.category_id} ${row.category_name}` - .toLowerCase() - .includes(query), - ); const submittedToday = submissions.data?.today === today ? submissions.data.items.find((day) => day.date === today)?.count @@ -191,8 +158,6 @@ export function HomePage({ (sum, day) => sum + day.count!, 0, ); - const unknownMultipliers = - multipliers.data?.items.filter((row) => row.value === null).length ?? 0; return (
@@ -286,34 +251,26 @@ export function HomePage({ } loading={simulations.loading} /> -
); diff --git a/frontend/src/pages/home.css b/frontend/src/pages/home.css index c1fd6e8..25531de 100644 --- a/frontend/src/pages/home.css +++ b/frontend/src/pages/home.css @@ -43,7 +43,7 @@ } .home-metrics { display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; } @@ -107,14 +107,11 @@ color: var(--muted); flex-shrink: 0; } -.home-calendar-card { - margin-bottom: 20px; -} .home-panels { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; - align-items: start; + align-items: stretch; } .home-connect { display: flex; @@ -170,15 +167,15 @@ .home-calendar { display: flex; gap: 10px; - min-width: 550px; + min-width: 510px; max-width: 840px; margin: 0 auto; } .home-weekdays { display: grid; grid-template-rows: repeat(7, 1fr); - gap: 5px; - padding-top: 25px; + gap: 4px; + padding-top: 24px; color: var(--muted); font-size: 11px; } @@ -188,15 +185,17 @@ } .home-calendar-weeks { display: grid; + min-width: 0; grid-auto-flow: column; grid-auto-columns: minmax(14px, 1fr); - gap: 5px; + gap: 4px; flex: 1; } .home-calendar-week { display: grid; + min-width: 0; grid-template-rows: 20px repeat(7, 1fr); - gap: 5px; + gap: 4px; } .home-month { color: var(--muted); @@ -282,32 +281,6 @@ body[theme-mode="dark"] .heat-4 { .home-legend > span { margin: 0 4px; } -.home-table-tools { - display: flex; - align-items: center; - gap: 12px; - margin-bottom: 16px; -} -.home-table-tools > span { - color: var(--muted); - font-size: 12px; - flex-shrink: 0; -} -.home-table-wrap { - max-height: 300px; - overflow: auto; -} -.home-category { - overflow-wrap: anywhere; -} -.home-category strong { - font-weight: 400; -} -.home-category small { - display: block; - margin-top: 3px; - color: var(--muted); -} .home-footnote { color: var(--muted); font-size: 11px;