再调整样式和

This commit is contained in:
海龙 2025-08-29 00:11:04 +08:00
parent 21a8759bb6
commit 031cfb7928
3 changed files with 167 additions and 148 deletions

View File

@ -69,8 +69,8 @@ export function TopBar({
}; };
useEffect(() => { useEffect(() => {
const currentUser = localStorage.getItem("currentUser"); const token = localStorage.getItem("token");
if (JSON.parse(currentUser || "{}")?.token) { if (token) {
setIsLogin(true); setIsLogin(true);
} else { } else {
setIsLogin(false); setIsLogin(false);
@ -198,7 +198,8 @@ export function TopBar({
</div> </div>
</div> </div>
<div className="flex items-center space-x-4"> {
isLogin ?(<div className="flex items-center space-x-4">
{/* Pricing Link */} {/* Pricing Link */}
<Button <Button
variant="ghost" variant="ghost"
@ -358,7 +359,25 @@ export function TopBar({
) )
: null} : null}
</div> </div>
</div>):(
<div className="flex items-center space-x-4">
<button
data-alt="login-button"
className="w-[8.5rem] h-[3rem] text-base text-gray-300 hover:text-white transition-colors"
onClick={() => router.push("/login")}
>
Login
</button>
<button
data-alt="signup-button"
className="w-[8.5rem] h-[3rem] text-base bg-gray-200 text-gray-800 rounded-full hover:bg-white transition-colors"
onClick={() => router.push("/signup")}
>
Sign Up
</button>
</div> </div>
)
}
</div> </div>
</div> </div>
); );

View File

@ -642,7 +642,7 @@ function HomeModule5() {
: "text-white hover:text-gray-300" : "text-white hover:text-gray-300"
}`} }`}
> >
Yearly - <span className="text-[#FFCC6D]">10%</span> Yearly - <span className="text-[#FFCC6D]">20%</span>
</button> </button>
</div> </div>
</div> </div>

View File

@ -51,7 +51,7 @@ export default function Login() {
try { try {
await loginUser(email, password); await loginUser(email, password);
// 登录成功后跳转到首页 // 登录成功后跳转到首页
router.push("/"); router.push("/create");
} catch (error: any) { } catch (error: any) {
console.error("Login failed:", error); console.error("Login failed:", error);