fix docker?
This commit is contained in:
@@ -13,6 +13,7 @@ import { toast } from "sonner";
|
||||
import { ArrowLeft, Send, RefreshCw, File, FileText, Image as ImageIcon, Download } from "lucide-react";
|
||||
import { getCookie, clientFetch } from "@/lib/api";
|
||||
import { ImageViewerModal } from "@/components/modals/image-viewer-modal";
|
||||
import Image from "next/image";
|
||||
import BuyerOrderInfo from "./BuyerOrderInfo";
|
||||
import { useIsTouchDevice } from "@/hooks/use-mobile";
|
||||
import { useChromebookScroll, useSmoothScrollToBottom } from "@/hooks/use-chromebook-scroll";
|
||||
@@ -742,13 +743,23 @@ export default function ChatDetail({ chatId }: { chatId: string }) {
|
||||
<Download className="h-3 w-3" aria-hidden="true" />
|
||||
</a>
|
||||
</div>
|
||||
<img
|
||||
src={attachment}
|
||||
alt={fileName}
|
||||
<Image
|
||||
src={attachment}
|
||||
alt={fileName}
|
||||
width={400}
|
||||
height={300}
|
||||
placeholder="blur"
|
||||
blurDataURL="/placeholder-image.svg"
|
||||
quality={85}
|
||||
className="max-w-full max-h-60 object-contain cursor-pointer hover:opacity-90 transition-opacity rounded"
|
||||
onError={(e) => {
|
||||
(e.target as HTMLImageElement).src = "/placeholder-image.svg";
|
||||
// Fallback to placeholder on error
|
||||
const target = e.target as any;
|
||||
if (target && target.src !== "/placeholder-image.svg") {
|
||||
target.src = "/placeholder-image.svg";
|
||||
}
|
||||
}}
|
||||
onClick={() => handleImageClick(attachment, messageIndex, attachmentIndex)}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user