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
@@ -1,6 +1,7 @@
"use client";
import { useEffect } from "react";
import Image from "next/image";
import Link from "next/link";
import { MobileShell } from "@/app/_components/core/mobile-shell";
@@ -35,8 +36,7 @@ export function SidebarScreen() {
<section className={styles.profileCard}>
<div className={styles.avatar}>
{user.avatarUrl ? (
// eslint-disable-next-line @next/next/no-img-element
<img src={user.avatarUrl} alt="" />
<Image src={user.avatarUrl} alt="" width={64} height={64} />
) : (
<span className={styles.avatarInitial}>
{(user.currentUser?.username ?? "?").charAt(0).toUpperCase()}