MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / HeaderProps

Interface HeaderProps

src/components/Header.tsx:12–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10import type { ProcessedMarket } from "@/types";
11
12interface HeaderProps {
13 lastRefresh: string | null;
14 dataMode: "live" | "sample";
15 loading: boolean;
16 onRefresh: () => void;
17 marketCount: number;
18 globalCount: number;
19 lastSyncTime?: string | null;
20 onOpenSettings: () => void;
21 watchedCount?: number;
22 alertUnreadCount?: number;
23 autoRefresh?: boolean;
24 refreshError?: boolean;
25 onTrade?: (state: import("./TradeModal").TradeModalState) => void;
26 onTradePosition?: (title: string, outcome: string) => void;
27 // Alert manager props
28 alertManagerOpen?: boolean;
29 onOpenAlertManager?: () => void;
30 onCloseAlertManager?: () => void;
31 alertProps?: {
32 alerts: AlertConfig[];
33 history: AlertHistoryEntry[];
34 onAddAlert: (config: Omit<AlertConfig, "id" | "createdAt" | "enabled">) => void;
35 onRemoveAlert: (id: string) => void;
36 onToggleAlert: (id: string) => void;
37 onMarkRead: (id: string) => void;
38 onMarkAllRead: () => void;
39 onClearHistory: () => void;
40 allMarkets: ProcessedMarket[];
41 prefill?: { marketId?: string; marketTitle?: string };
42 notifPermission: NotificationPermission;
43 onRequestPermission: () => void;
44 };
45}
46
47function getRelativeTime(iso: string): { text: string; stale: boolean } {
48 const diff = Date.now() - new Date(iso).getTime();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected