refactor(chat): reuse fullscreen back button

This commit is contained in:
2026-07-14 16:54:26 +08:00
parent 81d6489978
commit df6bb663c1
3 changed files with 18 additions and 7 deletions
@@ -12,6 +12,8 @@
import { ChevronLeft } from "lucide-react";
import { useEffect } from "react";
import { BackButton } from "@/app/_components";
import { ChatMediaImage } from "./chat-media-image";
import styles from "./fullscreen-image-viewer.module.css";
@@ -90,14 +92,13 @@ export function FullscreenImageViewer({
aria-modal="true"
aria-label="Fullscreen image"
>
<button
type="button"
<BackButton
className={styles.backButton}
onClick={onClose}
aria-label="Back"
>
<ChevronLeft size={34} strokeWidth={2.5} aria-hidden="true" />
</button>
ariaLabel="Back"
iconSize={34}
variant="unstyled"
/>
<ChatMediaImage
messageId={messageId}
remoteUrl={imageUrl}