Files
trumpsignal-monorepo/apps/web/pages/[locale]/settings.tsx
T

49 lines
1.9 KiB
TypeScript

import type { Metadata } from 'next'
import SettingsClient from '@/screens/settings/SettingsClient'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
async function generateMetadata(): Promise<Metadata> {
const locale = 'en'
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
const title = isZh ? '机器人设置与订阅' : 'Bot Settings & Subscription'
const description = isZh
? '配置订阅状态、Hyperliquid API、风控参数、自动交易模式和提醒渠道。这里决定 Trump Alpha 如何代表你执行。'
: 'Configure subscription state, Hyperliquid API access, risk controls, auto-trade mode, and alert channels. This page defines how Trump Alpha executes for you.'
return {
title,
description,
alternates: {
canonical: `${siteUrl}/en/settings`,
languages: {
en: `${siteUrl}/en/settings`,
},
},
}
}
export default function SettingsPage() {
const locale = 'en'
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
return (
<div className="page">
<div className="page-head">
<div>
<h1 className="page-title">{isZh ? '设置' : 'Settings'}</h1>
<p className="page-sub">
{isZh
? '订阅、交易所密钥、风险限制和运行时间安排,都会在这里配置。'
: 'Subscription, exchange key, risk limits, and schedule — everything that decides how the bot trades.'}
</p>
</div>
</div>
<SettingsClient />
</div>
)
}
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
if (context.params?.locale !== 'en') return { notFound: true }
return { props: { ...{}, seo: await generateMetadata() } }
}