diff --git a/components/layout/top-bar.tsx b/components/layout/top-bar.tsx
index 0508606..68e6c75 100644
--- a/components/layout/top-bar.tsx
+++ b/components/layout/top-bar.tsx
@@ -69,8 +69,8 @@ export function TopBar({
};
useEffect(() => {
- const currentUser = localStorage.getItem("currentUser");
- if (JSON.parse(currentUser || "{}")?.token) {
+ const token = localStorage.getItem("token");
+ if (token) {
setIsLogin(true);
} else {
setIsLogin(false);
@@ -198,167 +198,186 @@ export function TopBar({
-
- {/* Pricing Link */}
-
-
- {/* Notifications */}
- {/*
*/}
-
- {/* Theme Toggle */}
- {/*
*/}
-
- {/* User Menu */}
-
+ {
+ isLogin ?(
+ {/* Pricing Link */}
- {mounted && isOpen
- ? ReactDOM.createPortal(
-
e.stopPropagation()}
- >
- {/* User Info */}
-
-
-
- MF
-
-
-
- {currentUser.name}
-
-
- {currentUser.email}
-
-
-
{
- logoutUser();
- }}
- title="退出登录"
- >
-
-
-
-
+ {/* Notifications */}
+ {/* */}
- {/* AI Points */}
-
-
-
-
- {isLoadingSubscription ? '...' : `${credits} credits`}
-
+ {/* Theme Toggle */}
+ {/*
*/}
+
+ {/* User Menu */}
+
+
+
+ {mounted && isOpen
+ ? ReactDOM.createPortal(
+
e.stopPropagation()}
+ >
+ {/* User Info */}
+
+
+
+ MF
+
+
+
+ {currentUser.name}
+
+
+ {currentUser.email}
+
+
+
{
+ logoutUser();
+ }}
+ title="退出登录"
+ >
+
+
+
-
- {subscriptionStatus === 'ACTIVE' && (
+
+ {/* AI Points */}
+
+
+
+
+ {isLoadingSubscription ? '...' : `${credits} credits`}
+
+
- )}
-
-
- {/* Menu Items */}
-
- {/*
router.push('/my-library')}
- data-alt="my-library-button"
- >
-
- My Library
-
-
-
{
- // 处理退出登录
- setIsOpen(false);
- }}
- data-alt="logout-button"
- >
-
- Logout
- */}
-
- {/* Footer */}
-
-
Privacy Policy · Terms of Service
-
250819215404 | 2025/8/20 06:00:50
+ {subscriptionStatus === 'ACTIVE' && (
+
+ )}
-
- ,
- document.body
- )
- : null}
-
-
+
+ {/* Menu Items */}
+
+ {/*
router.push('/my-library')}
+ data-alt="my-library-button"
+ >
+
+ My Library
+
+
+
{
+ // 处理退出登录
+ setIsOpen(false);
+ }}
+ data-alt="logout-button"
+ >
+
+ Logout
+ */}
+
+ {/* Footer */}
+
+
Privacy Policy · Terms of Service
+
250819215404 | 2025/8/20 06:00:50
+
+
+ ,
+ document.body
+ )
+ : null}
+
+ ):(
+
+
+
+
+ )
+ }
);
diff --git a/components/pages/home-page2.tsx b/components/pages/home-page2.tsx
index bb17713..93c70d4 100644
--- a/components/pages/home-page2.tsx
+++ b/components/pages/home-page2.tsx
@@ -642,7 +642,7 @@ function HomeModule5() {
: "text-white hover:text-gray-300"
}`}
>
- Yearly - 10%
+ Yearly - 20%
diff --git a/components/pages/login.tsx b/components/pages/login.tsx
index 92ca8f4..7f6defd 100644
--- a/components/pages/login.tsx
+++ b/components/pages/login.tsx
@@ -51,7 +51,7 @@ export default function Login() {
try {
await loginUser(email, password);
// 登录成功后跳转到首页
- router.push("/");
+ router.push("/create");
} catch (error: any) {
console.error("Login failed:", error);