refactor: migrate img tags to next/image and fix hook usage

This commit is contained in:
2026-06-10 19:16:41 +08:00
parent 47591be41c
commit 2bc2e1b691
30 changed files with 62 additions and 55 deletions
+5 -1
View File
@@ -13,6 +13,7 @@
* - Spacer + AuthLegalText
* - 顶部 "← Back" 按钮由父级 AuthPanel 渲染(悬浮 40×40 圆形)
*/
import Image from "next/image";
import { useState } from "react";
import { useAuthState } from "@/stores/auth/auth-context";
@@ -48,10 +49,13 @@ export function AuthEmailPanel({
{mode === "login" ? (
<>
<div className={styles.spacer24} />
<img
<Image
src="/images/auth/ic-logo-login.png"
alt="Cozsweet"
width={120}
height={120}
className={styles.logo}
priority
/>
</>
) : (
@@ -11,6 +11,7 @@
* - "Other Sign-in Options" 链接打开底部弹层
* - 弹层 Email 按钮 → 触发 `onSwitchToEmail`(父级派发 `AuthPanelModeChanged`
*/
import Image from "next/image";
import { useState } from "react";
import { AuthPlatform } from "@/lib/auth/nextauth";
@@ -56,10 +57,13 @@ export function AuthFacebookPanel({ onSwitchToEmail }: AuthFacebookPanelProps) {
return (
<div className={styles.panel}>
<div className={styles.spacer} />
<img
<Image
src="/images/auth/ic-logo-login.png"
alt="Cozsweet"
width={120}
height={120}
className={styles.logo}
priority
/>
<div className={styles.spacer} />