Files
trumpsignal-frontend/app/[locale]/layout.tsx
T
k 040e1df685 feat: revamp dashboard, trades, and add landing/legal pages
- Major UI updates across dashboard, analytics, posts, trades, settings
- New landing page, robots/sitemap, contact/privacy/terms pages
- Updated globals.css with extensive styling and new landing.css
- Refactor signedRequest, realtime data hook, and dashboard store

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 16:04:57 +08:00

47 lines
1.5 KiB
TypeScript

import { NextIntlClientProvider } from 'next-intl'
import { getMessages } 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'
interface LayoutProps {
children: React.ReactNode
params: { locale: string }
}
export default async function LocaleLayout({ children, params: { locale } }: LayoutProps) {
if (!locales.includes(locale as (typeof locales)[number])) {
notFound()
}
const messages = await getMessages()
const href = (path: string) => `/${locale}${path}`
return (
<NextIntlClientProvider messages={messages}>
<Providers>
<Navbar />
<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()} TrumpSignal</span>
<Link href={href('/privacy')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>Privacy</Link>
<Link href={href('/terms')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>Terms</Link>
<Link href={href('/contact')} style={{ color: 'var(--ink-3)', textDecoration: 'none' }}>Contact</Link>
</footer>
</Providers>
</NextIntlClientProvider>
)
}