🐛 fix: Fix title

This commit is contained in:
canisminor1990
2023-07-17 14:56:03 +08:00
parent be6281d1e8
commit 0b7baf4c58
4 changed files with 11 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ const API_END_PORT_URL = process.env.API_END_PORT_URL || '';
/** @type {import('next').NextConfig} */
const nextConfig = {
i18n: i18nConfig.i18n,
//i18n: i18nConfig.i18n,
reactStrictMode: true,
pageExtensions: ['page.tsx', 'api.ts'],
transpilePackages: ['@lobehub/ui', 'antd-style'],

View File

@@ -2,11 +2,13 @@ import { Analytics } from '@vercel/analytics/react';
import { appWithTranslation } from 'next-i18next';
import type { AppProps } from 'next/app';
import i18nConfig from '@/../next-i18next.config';
import Layout from '@/layout';
const App = appWithTranslation(({ Component, pageProps }: AppProps) => (
<Component {...pageProps} />
));
const App = appWithTranslation(
({ Component, pageProps }: AppProps) => <Component {...pageProps} />,
i18nConfig,
);
export default (props: AppProps) => {
return (

View File

@@ -23,10 +23,12 @@ const Chat = memo(() => {
i18n.reloadResources(i18n.resolvedLanguage, ['common']);
}, []);
const pageTitle = title ? `${title} - LobeChat` : 'LobeChat';
return (
<Layout>
<Head>
<title>{title ? `${title} - LobeChat` : 'LobeChat'}</title>
<title>{pageTitle}</title>
</Head>
<Flexbox flex={1}>

View File

@@ -12,10 +12,11 @@ import SettingForm from './SettingForm';
const SettingLayout = memo(() => {
const { t } = useTranslation('setting');
const pageTitle = `${t('header')} - LobeChat`;
return (
<>
<Head>
<title>{t('header')} - LobeChat</title>
<title>{pageTitle}</title>
</Head>
<Flexbox horizontal width={'100%'}>
<Sidebar />