38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
'use client';
|
|
|
|
import React, { useState } from 'react';
|
|
import './globals.css';
|
|
import Header from '@/components/Header';
|
|
import Footer from '@/components/Footer';
|
|
import { LocaleContext, type Locale } from '@/i18n';
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const [locale, setLocale] = useState<Locale>('zh-CN');
|
|
|
|
return (
|
|
<html lang={locale}>
|
|
<head>
|
|
<title>Genex - 券金融平台</title>
|
|
<meta name="description" content="区块链驱动的券资产交易平台,折扣购券、自由交易、安全保障" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="icon" href="/favicon.ico" />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
</head>
|
|
<body>
|
|
<LocaleContext.Provider value={{ locale, setLocale }}>
|
|
<Header />
|
|
<main>{children}</main>
|
|
<Footer />
|
|
</LocaleContext.Provider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|