continent-grouping 审查修复:localTimeRange 排序、key 类型收窄
This commit is contained in:
@@ -13,7 +13,7 @@ export const TRADING_REGIONS = [
|
|||||||
export type TradingRegionKey = (typeof TRADING_REGIONS)[number]["key"];
|
export type TradingRegionKey = (typeof TRADING_REGIONS)[number]["key"];
|
||||||
|
|
||||||
export interface ContinentGroup {
|
export interface ContinentGroup {
|
||||||
key: string;
|
key: TradingRegionKey | "active_signals";
|
||||||
labelEn: string;
|
labelEn: string;
|
||||||
labelZh: string;
|
labelZh: string;
|
||||||
sort: number;
|
sort: number;
|
||||||
@@ -154,7 +154,10 @@ export function buildContinentGroups(rows: ScanOpportunityRow[], isEn: boolean):
|
|||||||
);
|
);
|
||||||
const hotCity = sorted[0]?.city_display_name || sorted[0]?.city || null;
|
const hotCity = sorted[0]?.city_display_name || sorted[0]?.city || null;
|
||||||
|
|
||||||
const times = regionRows.map((r) => String(r.local_time || "").trim()).filter(Boolean);
|
const times = regionRows
|
||||||
|
.map((r) => String(r.local_time || "").trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.sort();
|
||||||
const ltRange = times.length >= 2
|
const ltRange = times.length >= 2
|
||||||
? `${times[0]}-${times[times.length - 1]}`
|
? `${times[0]}-${times[times.length - 1]}`
|
||||||
: times[0] || null;
|
: times[0] || null;
|
||||||
|
|||||||
Reference in New Issue
Block a user