diff --git a/components/ui/dashboard/DashboardBody.js b/components/ui/dashboard/DashboardBody.js
index 89b60329b42..f43aa182f97 100644
--- a/components/ui/dashboard/DashboardBody.js
+++ b/components/ui/dashboard/DashboardBody.js
@@ -1,7 +1,7 @@
'use client'
-import { UserProfile } from '@clerk/nextjs'
import dynamic from 'next/dynamic'
import { useRouter } from 'next/router'
+import DashboardUser from './DashboardUser'
const DashboardMenuList = dynamic(() => import('./DashboardMenuList'))
const DashboardItemMembership = dynamic(
@@ -25,21 +25,11 @@ export default function DashboardBody() {
{basePath === '/dashboard' &&
}
- {(basePath === '/dashboard/user-profile' ||
- basePath === '/dashboard/user-profile/security') && (
-
+ {basePath?.indexOf('/dashboard/user-profile') === 0 && (
+
)}
{basePath === '/dashboard/balance' &&
}
{basePath === '/dashboard/membership' &&
}
diff --git a/components/ui/dashboard/DashboardHeader.js b/components/ui/dashboard/DashboardHeader.js
index 7542eea1cce..f564374fded 100644
--- a/components/ui/dashboard/DashboardHeader.js
+++ b/components/ui/dashboard/DashboardHeader.js
@@ -1,8 +1,9 @@
import LazyImage from '@/components/LazyImage'
import { useGlobal } from '@/lib/global'
import formatDate from '@/lib/utils/formatDate'
-import { SignOutButton } from '@clerk/nextjs'
import Link from 'next/link'
+import DashboardSignOutButton from './DashboardSignOutButton'
+
/**
* 仪表盘页头
* @returns
@@ -39,13 +40,7 @@ export default function DashboardHeader() {
{/* 登出按钮 */}
-
-
-
+
>
diff --git a/components/ui/dashboard/DashboardSignOutButton.js b/components/ui/dashboard/DashboardSignOutButton.js
new file mode 100644
index 00000000000..5a58159ac83
--- /dev/null
+++ b/components/ui/dashboard/DashboardSignOutButton.js
@@ -0,0 +1,20 @@
+import { SignOutButton } from '@clerk/nextjs'
+/**
+ * 控制台登出按钮
+ * @returns
+ */
+export default function DashboardSignOutButton() {
+ const enableClerk = process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
+ if (!enableClerk) {
+ return null
+ }
+ return (
+