移动端城市列表移除可交易城市过滤,始终显示全部监测城市
Constraint: MobileCityPicker 数据源仅使用 store.cities Scope-risk: 仅影响 cityListRows 构建逻辑
This commit is contained in:
@@ -128,42 +128,43 @@ function ScanTerminalScreen() {
|
|||||||
[terminalData?.rows],
|
[terminalData?.rows],
|
||||||
);
|
);
|
||||||
|
|
||||||
const cityListRows = useMemo(() => {
|
const cityListRows = useMemo(
|
||||||
if (timeSortedRows.length > 0) return timeSortedRows;
|
() =>
|
||||||
return store.cities.map((city, index) => {
|
store.cities.map((city, index) => {
|
||||||
const cityKey = normalizeCityKey(city.name);
|
const cityKey = normalizeCityKey(city.name);
|
||||||
const summary =
|
const summary =
|
||||||
store.citySummariesByName[cityKey] ??
|
store.citySummariesByName[cityKey] ??
|
||||||
Object.values(store.citySummariesByName).find(
|
Object.values(store.citySummariesByName).find(
|
||||||
(s) => normalizeCityKey(s?.name) === cityKey,
|
(s) => normalizeCityKey(s?.name) === cityKey,
|
||||||
) ??
|
) ??
|
||||||
null;
|
null;
|
||||||
return {
|
return {
|
||||||
id: `city-fallback:${cityKey}:${index}`,
|
id: `city-fallback:${cityKey}:${index}`,
|
||||||
city: cityKey,
|
city: cityKey,
|
||||||
city_display_name: city.display_name || city.name,
|
city_display_name: city.display_name || city.name,
|
||||||
display_name: city.display_name || city.name,
|
display_name: city.display_name || city.name,
|
||||||
temp_symbol: city.temp_unit === "fahrenheit" ? "°F" : "°C",
|
temp_symbol: city.temp_unit === "fahrenheit" ? "°F" : "°C",
|
||||||
current_temp: summary?.current?.temp ?? null,
|
current_temp: summary?.current?.temp ?? null,
|
||||||
current_max_so_far: summary?.current?.temp ?? null,
|
current_max_so_far: summary?.current?.temp ?? null,
|
||||||
deb_prediction: summary?.deb?.prediction ?? null,
|
deb_prediction: summary?.deb?.prediction ?? null,
|
||||||
airport: city.airport || null,
|
airport: city.airport || null,
|
||||||
local_time: summary?.local_time ?? null,
|
local_time: summary?.local_time ?? null,
|
||||||
risk_level: city.risk_level || "low",
|
risk_level: city.risk_level || "low",
|
||||||
market_slug: null,
|
market_slug: null,
|
||||||
market_question: null,
|
market_question: null,
|
||||||
target_label: null,
|
target_label: null,
|
||||||
side: null,
|
side: null,
|
||||||
edge_percent: null,
|
edge_percent: null,
|
||||||
final_score: null,
|
final_score: null,
|
||||||
window_phase: null,
|
window_phase: null,
|
||||||
tradable: false,
|
tradable: false,
|
||||||
active: false,
|
active: false,
|
||||||
closed: false,
|
closed: false,
|
||||||
accepting_orders: false,
|
accepting_orders: false,
|
||||||
} satisfies ScanOpportunityRow;
|
} satisfies ScanOpportunityRow;
|
||||||
});
|
}),
|
||||||
}, [timeSortedRows, store.cities, store.citySummariesByName]);
|
[store.cities, store.citySummariesByName],
|
||||||
|
);
|
||||||
const {
|
const {
|
||||||
addAiPinnedCity,
|
addAiPinnedCity,
|
||||||
aiPinnedCities,
|
aiPinnedCities,
|
||||||
|
|||||||
Reference in New Issue
Block a user