feature/ignore-self-toggle #1
@@ -323,7 +323,14 @@ Create `frontend/src/components/BanTrendChart.tsx`. This component renders an **
|
|||||||
|
|
||||||
### Task 4.3 — Integrate the trend chart into `DashboardPage`
|
### Task 4.3 — Integrate the trend chart into `DashboardPage`
|
||||||
|
|
||||||
**Status:** `not started`
|
**Status:** `done`
|
||||||
|
|
||||||
|
Added a "Ban Trend" full-width section card to `DashboardPage` between the
|
||||||
|
`ServerStatusBar` and the "Top Countries" section. The section renders
|
||||||
|
`<BanTrendChart timeRange={timeRange} origin={originFilter} />`, sharing the
|
||||||
|
same state already used by the country charts and ban list. Loading, error,
|
||||||
|
and empty states are handled inside `BanTrendChart` itself. `tsc --noEmit` and
|
||||||
|
ESLint pass with zero warnings.
|
||||||
|
|
||||||
Add the `BanTrendChart` to the dashboard page **above** the two country charts and **below** the `ServerStatusBar`.
|
Add the `BanTrendChart` to the dashboard page **above** the two country charts and **below** the `ServerStatusBar`.
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,10 @@ import {
|
|||||||
tokens,
|
tokens,
|
||||||
} from "@fluentui/react-components";
|
} from "@fluentui/react-components";
|
||||||
import { BanTable } from "../components/BanTable";
|
import { BanTable } from "../components/BanTable";
|
||||||
|
import { BanTrendChart } from "../components/BanTrendChart";
|
||||||
import { ServerStatusBar } from "../components/ServerStatusBar";
|
import { ServerStatusBar } from "../components/ServerStatusBar";
|
||||||
import { TopCountriesPieChart } from "../components/TopCountriesPieChart";
|
|
||||||
import { TopCountriesBarChart } from "../components/TopCountriesBarChart";
|
import { TopCountriesBarChart } from "../components/TopCountriesBarChart";
|
||||||
|
import { TopCountriesPieChart } from "../components/TopCountriesPieChart";
|
||||||
import { useDashboardCountryData } from "../hooks/useDashboardCountryData";
|
import { useDashboardCountryData } from "../hooks/useDashboardCountryData";
|
||||||
import type { BanOriginFilter, TimeRange } from "../types/ban";
|
import type { BanOriginFilter, TimeRange } from "../types/ban";
|
||||||
import { BAN_ORIGIN_FILTER_LABELS, TIME_RANGE_LABELS } from "../types/ban";
|
import { BAN_ORIGIN_FILTER_LABELS, TIME_RANGE_LABELS } from "../types/ban";
|
||||||
@@ -117,6 +118,20 @@ export function DashboardPage(): React.JSX.Element {
|
|||||||
{/* ------------------------------------------------------------------ */}
|
{/* ------------------------------------------------------------------ */}
|
||||||
<ServerStatusBar />
|
<ServerStatusBar />
|
||||||
|
|
||||||
|
{/* ------------------------------------------------------------------ */}
|
||||||
|
{/* Ban Trend section */}
|
||||||
|
{/* ------------------------------------------------------------------ */}
|
||||||
|
<div className={styles.section}>
|
||||||
|
<div className={styles.sectionHeader}>
|
||||||
|
<Text as="h2" size={500} weight="semibold">
|
||||||
|
Ban Trend
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
<div className={styles.tabContent}>
|
||||||
|
<BanTrendChart timeRange={timeRange} origin={originFilter} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* ------------------------------------------------------------------ */}
|
{/* ------------------------------------------------------------------ */}
|
||||||
{/* Charts section */}
|
{/* Charts section */}
|
||||||
{/* ------------------------------------------------------------------ */}
|
{/* ------------------------------------------------------------------ */}
|
||||||
|
|||||||
Reference in New Issue
Block a user