'use client' import { useState, useEffect } from 'react' import Link from 'next/link' import { usePathname } from 'next/navigation' import { useLocale } from 'next-intl' import { useAccount } from 'wagmi' import BotConfigPanel from '@/components/trades/BotConfigPanel' import TelegramCard from '@/components/telegram/TelegramCard' /** * Settings page — the home for all configuration. * * Previously the BotConfigPanel lived on /trades (alongside the trade history), * and /settings was just a redirect card. That made /trades double-duty * (configure AND view results) and /settings feel like a dead end. We swap: * - /settings → all configuration (bot, exchange key, subscription) * - /trades → pure execution view (open positions + history) * Legal links stay here since this is the "everything else" page. */ export default function SettingsClient() { const localeIntl = useLocale() const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json const { address, isConnected } = useAccount() const [mounted, setMounted] = useState(false) const pathname = usePathname() useEffect(() => { setMounted(true) }, []) const locale = pathname.split('/')[1] || 'en' const href = (path: string) => `/${locale}${path}` return (