Skip to content

Commit

Permalink
update baidu key (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 authored Jul 30, 2024
1 parent a8a6d33 commit 5a60fbc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 36 deletions.
6 changes: 3 additions & 3 deletions projects/fastgpt/app/BaiDuAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
'use client';

import Script from "next/script";
import Script from 'next/script';

const BaiDuAnalytics = () => {
return (
Expand All @@ -19,7 +19,7 @@ const BaiDuAnalytics = () => {
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`,
`
}}
/>
</>
Expand Down
56 changes: 23 additions & 33 deletions projects/fastgpt/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import BaiDuAnalytics from "@/app/BaiDuAnalytics";
import GoogleAnalytics from "@/app/GoogleAnalytics";
import { TailwindIndicator } from "@/components/TailwindIndicator";
import { ThemeProvider } from "@/components/ThemeProvider";
import Footer from "@/components/footer/Footer";
//import Header from "@/components/header/Header";
import { siteConfig } from "@/config/site";
import { defaultLocale } from "@/lib/i18n";
import { cn } from "@/lib/utils";
import "@/styles/globals.css";
import "@/styles/loading.css";
import "@/styles/plyr.css";
import { Analytics } from "@vercel/analytics/react";
import { Metadata, Viewport } from "next";
import { Inter as FontSans } from "next/font/google";
import BaiDuAnalytics from '@/app/BaiDuAnalytics';
import GoogleAnalytics from '@/app/GoogleAnalytics';
import { TailwindIndicator } from '@/components/TailwindIndicator';
import { ThemeProvider } from '@/components/ThemeProvider';
import Footer from '@/components/footer/Footer';
import { siteConfig } from '@/config/site';
import { defaultLocale } from '@/lib/i18n';
import { cn } from '@/lib/utils';
import '@/styles/globals.css';
import '@/styles/loading.css';
import '@/styles/plyr.css';
import { Analytics } from '@vercel/analytics/react';
import { Viewport } from 'next';
import { Inter as FontSans } from 'next/font/google';

const fontSans = FontSans({
subsets: ["latin"],
variable: "--font-sans",
subsets: ['latin'],
variable: '--font-sans'
});

export const metadata = {
Expand All @@ -30,40 +29,31 @@ export const metadata = {
openGraph: siteConfig.openGraph,
twitter: siteConfig.twitter,
other: {
"baidu-site-verification": 'codeva-mpHTn35uE0',
},
'baidu-site-verification': 'codeva-Zu5ilzXRik'
}
};
export const viewport: Viewport = {
themeColor: siteConfig.themeColors,
themeColor: siteConfig.themeColors
};

export default async function RootLayout({
children,
params: { lang },
params: { lang }
}: {
children: React.ReactNode;
params: { lang: string[] | undefined };
}) {
return (
<html lang={(lang && lang[0]) || defaultLocale} suppressHydrationWarning>
<head />
<body
className={cn(
"min-h-screen bg-background font-sans antialiased",
fontSans.variable
)}
>
<ThemeProvider
attribute="class"
defaultTheme={siteConfig.nextThemeColor}
enableSystem
>
<body className={cn('min-h-screen bg-background font-sans antialiased', fontSans.variable)}>
<ThemeProvider attribute="class" defaultTheme={siteConfig.nextThemeColor} enableSystem>
{children}
<Footer />
<Analytics />
<TailwindIndicator />
</ThemeProvider>
{process.env.NODE_ENV === "development" ? (
{process.env.NODE_ENV === 'development' ? (
<></>
) : (
<>
Expand Down

0 comments on commit 5a60fbc

Please sign in to comment.