Files
trumpsignal-frontend/app/[locale]/layout.tsx
T
k 4c3c8c6f87 KOL count: 29 → 25 across marketing/SEO copy
Backend KOL_FEEDS trimmed from 29 to 25 (dead feeds removed).
Sync all hardcoded count mentions:
- layout.tsx JSON-LD, page.tsx (metric + comparison + copy)
- kol/page.tsx, KolPageClient.tsx ("and 26 more" → "and 22 more")
- glossary/page.tsx, opengraph-image.tsx
- public/llms.txt, llms-full.txt
- drop removed KOLs (Dragonfly Capital, Nic Carter) from named lists

Bundles other in-flight frontend work already in the working tree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 22:55:27 +08:00

75 lines
2.8 KiB
TypeScript

import type { Metadata } from 'next'
import { NextIntlClientProvider } from 'next-intl'
import { getMessages, getTranslations } from 'next-intl/server'
import { notFound } from 'next/navigation'
import Link from 'next/link'
import { locales } from '@/i18n'
import Providers from './Providers'
import Navbar from '@/components/nav/Navbar'
import TradeAlertBanner from '@/components/ui/TradeAlertBanner'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
interface LayoutProps {
children: React.ReactNode
params: Promise<{ locale: string }>
}
export async function generateMetadata({ params }: LayoutProps): Promise<Metadata> {
const { locale } = await params
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
return {
alternates: {
canonical: `${siteUrl}/${locale}`,
languages: {
'en': `${siteUrl}/en`,
'x-default': `${siteUrl}/en`,
},
},
openGraph: {
locale: isZh ? 'zh_CN' : 'en_US',
alternateLocale: isZh ? ['en_US'] : ['zh_CN'],
},
}
}
export default async function LocaleLayout({ children, params }: LayoutProps) {
const { locale } = await params
if (!locales.includes(locale as (typeof locales)[number])) {
notFound()
}
const messages = await getMessages()
const t = await getTranslations({ locale, namespace: 'footer' })
const href = (path: string) => `/${locale}${path}`
return (
<NextIntlClientProvider messages={messages}>
<Providers>
<Navbar />
<TradeAlertBanner />
<main>{children}</main>
<footer style={{
borderTop: '1px solid var(--line)',
padding: '20px 32px',
display: 'flex',
gap: 16,
alignItems: 'center',
flexWrap: 'wrap',
fontSize: 12,
color: 'var(--ink-3)',
marginTop: 48,
}}>
<span>© {new Date().getFullYear()} Trump Alpha a research project by Endorphin</span>
<Link href={href('/methodology')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>{t('methodology')}</Link>
<Link href={href('/glossary')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>{t('glossary')}</Link>
<Link href={href('/case-studies')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>{t('caseStudies')}</Link>
<Link href={href('/privacy')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>{t('privacy')}</Link>
<Link href={href('/terms')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>{t('terms')}</Link>
<Link href={href('/contact')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>{t('contact')}</Link>
</footer>
</Providers>
</NextIntlClientProvider>
)
}