Move frontend runtime constants out of types/ban.ts
This commit is contained in:
17
frontend/src/utils/constants.ts
Normal file
17
frontend/src/utils/constants.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Shared runtime constants used by the frontend UI.
|
||||
*/
|
||||
import type { BanOriginFilter, TimeRange } from "../types/ban";
|
||||
|
||||
export const BAN_ORIGIN_FILTER_LABELS: Record<BanOriginFilter, string> = {
|
||||
all: "All",
|
||||
blocklist: "Blocklist",
|
||||
selfblock: "Selfblock",
|
||||
} as const;
|
||||
|
||||
export const TIME_RANGE_LABELS: Record<TimeRange, string> = {
|
||||
"24h": "Last 24 h",
|
||||
"7d": "Last 7 days",
|
||||
"30d": "Last 30 days",
|
||||
"365d": "Last 365 days",
|
||||
} as const;
|
||||
Reference in New Issue
Block a user