2b1d7c0b65
The dashboard had several oversized orchestration, component, and CSS files that made product-copy changes and mobile/performance work risky. This refactor preserves behavior while splitting scan terminal CSS, opportunity helpers, future forecast panels, history/detail charts, and probability/model sections into smaller ownership boundaries. Constraint: No user-visible version bump because this batch is architecture and performance cleanup, not a release announcement. Rejected: Rewrite dashboard state management in the same batch | too broad for a safe upload after CSS and component splitting. Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep new component/CSS boundaries instead of moving product copy back into the large dashboard files. Tested: npm run build; npm run test:business; git diff --check Not-tested: Browser visual smoke test after push
11 lines
265 B
TypeScript
11 lines
265 B
TypeScript
import type { ScanOpportunityRow } from "@/lib/dashboard-types";
|
|
|
|
export function getLocalizedRowText(
|
|
row: ScanOpportunityRow,
|
|
locale: string,
|
|
zh?: string | null,
|
|
en?: string | null,
|
|
) {
|
|
return locale === "en-US" ? en || zh || null : zh || en || null;
|
|
}
|