diff --git a/.vscode/settings.json b/.vscode/settings.json
index 31b7e63..45e48d6 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -7,4 +7,7 @@
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
+ "[typescriptreact]": {
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
+ },
}
\ No newline at end of file
diff --git a/src/app/(home)/layout.tsx b/src/app/(home)/layout.tsx
index 8bb46b5..2299f5f 100644
--- a/src/app/(home)/layout.tsx
+++ b/src/app/(home)/layout.tsx
@@ -1,6 +1,7 @@
import {ReactNode} from 'react'
import Header from './header'
import Footer from './footer'
+import Script from 'next/script'
export type HomeLayoutProps = {
children: ReactNode
@@ -17,6 +18,8 @@ export default function HomeLayout(props: HomeLayoutProps) {
{/* 页脚 */}
+
+
)
}
diff --git a/src/app/admin/clients.tsx b/src/app/admin/clients.tsx
index bd2e6ad..cbe3858 100644
--- a/src/app/admin/clients.tsx
+++ b/src/app/admin/clients.tsx
@@ -75,19 +75,19 @@ export function Content(props: {children: ReactNode}) {
}
function ContentResolved() {
const profile = use(useProfileStore(store => store.profile))
- if (!profile) throw new Error('登录状态异常')
- return (
- <>
-
-
- >
- )
+ if (profile)
+ return (
+ <>
+
+
+ >
+ )
}
export function Header() {
@@ -127,8 +127,7 @@ export function Header() {
function HeaderUserCenter() {
const profile = use(useProfileStore(store => store.profile))
- if (!profile) throw new Error('登录状态异常')
- return
+ if (profile) return
}
export function Navbar() {
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index bc20703..b173c9d 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -25,7 +25,6 @@ export default async function RootLayout(props: Readonly<{
{props.children}
-