Files
buzz-sheet/components/comments/comment-image.tsx
T
gunshiz 9580407a90
CI / Verify (push) Successful in 1m56s
CI / Build immutable images and deploy (push) Successful in 3m12s
perf : cache
2026-10-08 23:21:34 +07:00

15 lines
664 B
TypeScript

"use client";
import Image from "@/components/ui/resilient-image";
import type { CommentImage } from "@/lib/comments/types";
import { cn } from "@/lib/utils";
export function CommentImageView({ image, alt, className, fullSize = false }: {
image: CommentImage; alt: string; className?: string; fullSize?: boolean;
}) {
if (fullSize) return <div className="relative h-[65svh] w-full">
<Image src={image.url} alt={alt} fill sizes="(min-width: 1024px) 960px, 100vw" className={cn("object-contain", className)} />
</div>;
return <Image src={image.url} alt={alt} width={144} height={144} sizes="(min-width: 640px) 144px, 112px" className={className} />;
}