43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import type { Metadata } from 'next'
|
|
import { Inter } from 'next/font/google'
|
|
import { NextIntlClientProvider } from 'next-intl'
|
|
import { getMessages } from 'next-intl/server'
|
|
import { notFound } from 'next/navigation'
|
|
import { locales } from '@/i18n'
|
|
import Navbar from '@/components/nav/Navbar'
|
|
import Providers from './Providers'
|
|
import './globals.css'
|
|
|
|
const inter = Inter({ subsets: ['latin'] })
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'TrumpSignal — AI-powered crypto trading signals',
|
|
description: 'Trade crypto based on Trump social media signals with AI confidence scoring.',
|
|
}
|
|
|
|
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()
|
|
|
|
return (
|
|
<html lang={locale}>
|
|
<body className={`${inter.className} bg-[#000000] min-h-screen text-white`}>
|
|
<NextIntlClientProvider messages={messages}>
|
|
<Providers>
|
|
<Navbar locale={locale} />
|
|
<main className="pt-14">{children}</main>
|
|
</Providers>
|
|
</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|