fix: lint workflow (#1167)

This commit is contained in:
josh 2025-09-08 21:02:06 +01:00 committed by GitHub
parent 256b4e0b89
commit 431eb919b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 28 additions and 22 deletions

View file

@ -2,6 +2,7 @@ import type { Attachment } from '@/lib/types';
import { Loader } from './elements/loader';
import { CrossSmallIcon, } from './icons';
import { Button } from './ui/button';
import Image from 'next/image';
export const PreviewAttachment = ({
attachment,
@ -17,15 +18,17 @@ export const PreviewAttachment = ({
const { name, url, contentType } = attachment;
return (
<div data-testid="input-attachment-preview" className="group relative w-16 h-16 rounded-lg overflow-hidden bg-muted border">
<div data-testid="input-attachment-preview" className="group relative size-16 rounded-lg overflow-hidden bg-muted border">
{contentType?.startsWith('image') ? (
<img
<Image
src={url}
alt={name ?? 'An image attachment'}
className="w-full h-full object-cover"
className="size-full object-cover"
width={64}
height={64}
/>
) : (
<div className="w-full h-full flex items-center justify-center text-xs text-muted-foreground">
<div className="size-full flex items-center justify-center text-xs text-muted-foreground">
File
</div>
)}
@ -47,7 +50,7 @@ export const PreviewAttachment = ({
</Button>
)}
<div className="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent text-white text-[10px] px-1 py-0.5 truncate">
<div className="absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent text-white text-[10px] px-1 py-0.5 truncate">
{name}
</div>
</div>