From e6ee525e0f74cc49d8cb8121cc873099da034a70 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sun, 19 Apr 2026 18:21:51 +0200 Subject: [PATCH] Deduplicate TimeRange type in frontend type definitions --- frontend/src/types/history.ts | 4 +++- frontend/src/types/map.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/types/history.ts b/frontend/src/types/history.ts index 7488e83..405a1a4 100644 --- a/frontend/src/types/history.ts +++ b/frontend/src/types/history.ts @@ -2,8 +2,10 @@ * TypeScript types for the ban history API. */ +import type { TimeRange } from "./ban"; + /** Optional time-range filter for history queries. */ -export type TimeRange = "24h" | "7d" | "30d" | "365d"; +export type { TimeRange }; /** A single row in the history ban-list table. */ export interface HistoryBanItem { diff --git a/frontend/src/types/map.ts b/frontend/src/types/map.ts index db541d5..a8844b6 100644 --- a/frontend/src/types/map.ts +++ b/frontend/src/types/map.ts @@ -2,8 +2,10 @@ * TypeScript types for the world-map / bans-by-country API. */ +import type { TimeRange } from "./ban"; + /** Time-range preset for filtering queries. */ -export type TimeRange = "24h" | "7d" | "30d" | "365d"; +export type { TimeRange }; /** A single enriched ban item as returned by the by-country endpoint. */ export interface MapBanItem {