Files
trumpsignal-frontend/app/[locale]/analytics/page.tsx
T
k e78a61bd6e fix(settings/analytics): canonical /en/, precise anchor navigation, scope card copy
Canonical URL fixes (parity with trump/macro/kol done earlier):
- analytics/page.tsx: canonical was `${siteUrl}/${locale}/analytics` → /en/
- settings/page.tsx:  canonical was `${siteUrl}/${locale}/settings`  → /en/

Settings scope card anchor navigation:
- Three scope cards ('Trump Signal ↓', 'Macro Vibes ↓', 'Global ↓') all
  pointed to #bot-config — same destination, no differentiation. Renamed:
  #config-trump / #config-macro / #config-global.
- Added matching id='config-trump/macro/global' to the three sections in
  BotConfigPanel so the anchors actually land at the right section.
- Removed misleading 'tab' wording ('Trump Signal tab ↓') — BotConfigPanel
  is not a tab component; it's a single-page vertical form. Copy now reads
  'Configure Trump ↓' etc.
- SystemControl already links to settings#bot-config which still resolves
  (the outer #bot-config wrapper div in SettingsClient is unchanged).

tsc + next build clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 00:56:59 +08:00

29 lines
1.1 KiB
TypeScript

import type { Metadata } from 'next'
import { getLocale } from 'next-intl/server'
import AnalyticsPageClient from './AnalyticsPageClient'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
export async function generateMetadata(): Promise<Metadata> {
const locale = await getLocale()
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
const title = isZh ? '交易分析与表现' : 'Trading Analytics & Performance'
const description = isZh
? '查看胜率、最大回撤、平均持仓时间、信号准确率和历史交易表现,评估 Trump Alpha 的真实执行质量。'
: 'Review win rate, drawdown, average hold time, signal accuracy, and historical trade performance to evaluate live execution quality.'
return {
title,
description,
alternates: {
canonical: `${siteUrl}/en/analytics`,
languages: {
en: `${siteUrl}/en/analytics`,
},
},
}
}
export default function AnalyticsPage() {
return <AnalyticsPageClient />
}