import { ExternalLink } from 'lucide-react' import { useLanguage } from '../contexts/LanguageContext' const VERGEX_EXPLORE_URL = 'https://vergex.trade/explore' // Strategy Market — proxied to vergex.trade/explore. // // vergex.trade currently sets `X-Frame-Options: SAMEORIGIN` on /explore which // makes browsers refuse cross-origin embedding and render their own "refused // to connect" page inside the iframe. There is no reliable way to detect // this from JavaScript (the iframe's `load` event fires for the browser // error page, and `contentWindow.location` always throws cross-origin // regardless of success or failure), so we don't try to be clever — we // surface a clean external-launch CTA instead. // // TO RE-ENABLE INLINE EMBEDDING: // 1. Ask the vergex.trade team to add NOFX origins to the /explore // CSP `frame-ancestors` (same as /trending: 'self' https://nofxos.ai // https://www.nofxos.ai http://127.0.0.1:3000 http://localhost:3000) // AND drop the `X-Frame-Options: SAMEORIGIN` header on that path. // 2. Replace this component with the same iframe pattern used by // DataPage.tsx (which already embeds vergex.trade/trending successfully). export function StrategyMarketPage() { const { language } = useLanguage() const heading = language === 'zh' ? 'Vergex 策略市场' : language === 'id' ? 'Pasar Strategi Vergex' : 'Vergex Strategy Market' const description = language === 'zh' ? '在 Vergex 上探索由社区创建的交易策略,一键复制到您的 NOFX 账户。当前需要在新窗口打开。' : language === 'id' ? 'Jelajahi strategi trading komunitas di Vergex dan salin ke akun NOFX Anda. Saat ini terbuka di tab baru.' : 'Explore community-built trading strategies on Vergex and copy them to your NOFX account. Currently opens in a new tab.' const ctaLabel = language === 'zh' ? '在 Vergex 打开策略市场' : language === 'id' ? 'Buka Pasar Strategi di Vergex' : 'Open Strategy Market on Vergex' const subtitle = language === 'zh' ? 'POWERED BY VERGEX.TRADE' : language === 'id' ? 'DITENAGAI OLEH VERGEX.TRADE' : 'POWERED BY VERGEX.TRADE' const features = language === 'zh' ? [ { label: '策略数量', value: '100+' }, { label: '覆盖市场', value: 'CEX & DEX' }, { label: '实时数据', value: '24/7' }, ] : language === 'id' ? [ { label: 'Total Strategi', value: '100+' }, { label: 'Cakupan Pasar', value: 'CEX & DEX' }, { label: 'Data Real-time', value: '24/7' }, ] : [ { label: 'Strategies', value: '100+' }, { label: 'Markets', value: 'CEX & DEX' }, { label: 'Live Data', value: '24/7' }, ] return (
{/* Ambient halos */}
{/* Main card */}
{/* Top gold edge */}
{/* Subtitle */}
{subtitle}
{/* Heading */}

{heading}

{/* Description */}

{description}

{/* CTA */} {ctaLabel} {/* Stats row */}
{features.map((f) => (
{f.value}
{f.label}
))}
{/* Footer hint */}

vergex.trade · {VERGEX_EXPLORE_URL}

) }