Skip to content

Commit 5a60fbc

Browse files
authored
update baidu key (#40)
1 parent a8a6d33 commit 5a60fbc

File tree

2 files changed

+26
-36
lines changed

2 files changed

+26
-36
lines changed

projects/fastgpt/app/BaiDuAnalytics.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"use client";
1+
'use client';
22

3-
import Script from "next/script";
3+
import Script from 'next/script';
44

55
const BaiDuAnalytics = () => {
66
return (
@@ -19,7 +19,7 @@ const BaiDuAnalytics = () => {
1919
var s = document.getElementsByTagName("script")[0];
2020
s.parentNode.insertBefore(hm, s);
2121
})();
22-
`,
22+
`
2323
}}
2424
/>
2525
</>

projects/fastgpt/app/layout.tsx

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
import BaiDuAnalytics from "@/app/BaiDuAnalytics";
2-
import GoogleAnalytics from "@/app/GoogleAnalytics";
3-
import { TailwindIndicator } from "@/components/TailwindIndicator";
4-
import { ThemeProvider } from "@/components/ThemeProvider";
5-
import Footer from "@/components/footer/Footer";
6-
//import Header from "@/components/header/Header";
7-
import { siteConfig } from "@/config/site";
8-
import { defaultLocale } from "@/lib/i18n";
9-
import { cn } from "@/lib/utils";
10-
import "@/styles/globals.css";
11-
import "@/styles/loading.css";
12-
import "@/styles/plyr.css";
13-
import { Analytics } from "@vercel/analytics/react";
14-
import { Metadata, Viewport } from "next";
15-
import { Inter as FontSans } from "next/font/google";
1+
import BaiDuAnalytics from '@/app/BaiDuAnalytics';
2+
import GoogleAnalytics from '@/app/GoogleAnalytics';
3+
import { TailwindIndicator } from '@/components/TailwindIndicator';
4+
import { ThemeProvider } from '@/components/ThemeProvider';
5+
import Footer from '@/components/footer/Footer';
6+
import { siteConfig } from '@/config/site';
7+
import { defaultLocale } from '@/lib/i18n';
8+
import { cn } from '@/lib/utils';
9+
import '@/styles/globals.css';
10+
import '@/styles/loading.css';
11+
import '@/styles/plyr.css';
12+
import { Analytics } from '@vercel/analytics/react';
13+
import { Viewport } from 'next';
14+
import { Inter as FontSans } from 'next/font/google';
1615

1716
const fontSans = FontSans({
18-
subsets: ["latin"],
19-
variable: "--font-sans",
17+
subsets: ['latin'],
18+
variable: '--font-sans'
2019
});
2120

2221
export const metadata = {
@@ -30,40 +29,31 @@ export const metadata = {
3029
openGraph: siteConfig.openGraph,
3130
twitter: siteConfig.twitter,
3231
other: {
33-
"baidu-site-verification": 'codeva-mpHTn35uE0',
34-
},
32+
'baidu-site-verification': 'codeva-Zu5ilzXRik'
33+
}
3534
};
3635
export const viewport: Viewport = {
37-
themeColor: siteConfig.themeColors,
36+
themeColor: siteConfig.themeColors
3837
};
3938

4039
export default async function RootLayout({
4140
children,
42-
params: { lang },
41+
params: { lang }
4342
}: {
4443
children: React.ReactNode;
4544
params: { lang: string[] | undefined };
4645
}) {
4746
return (
4847
<html lang={(lang && lang[0]) || defaultLocale} suppressHydrationWarning>
4948
<head />
50-
<body
51-
className={cn(
52-
"min-h-screen bg-background font-sans antialiased",
53-
fontSans.variable
54-
)}
55-
>
56-
<ThemeProvider
57-
attribute="class"
58-
defaultTheme={siteConfig.nextThemeColor}
59-
enableSystem
60-
>
49+
<body className={cn('min-h-screen bg-background font-sans antialiased', fontSans.variable)}>
50+
<ThemeProvider attribute="class" defaultTheme={siteConfig.nextThemeColor} enableSystem>
6151
{children}
6252
<Footer />
6353
<Analytics />
6454
<TailwindIndicator />
6555
</ThemeProvider>
66-
{process.env.NODE_ENV === "development" ? (
56+
{process.env.NODE_ENV === 'development' ? (
6757
<></>
6858
) : (
6959
<>

0 commit comments

Comments
 (0)