Skip to content

Commit

Permalink
feat(next/web): expand reply image files
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjdd committed Nov 22, 2023
1 parent 26a63ee commit ebc382d
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions next/web/src/App/Admin/Tickets/Ticket/components/ReplyCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useLocation, useNavigate } from 'react-router-dom';
import { AiOutlinePaperClip } from 'react-icons/ai';
import { BsThreeDots } from 'react-icons/bs';
import { useToggle } from 'react-use';
import { Dropdown, Image, MenuProps } from 'antd';
import { Dropdown, MenuProps } from 'antd';
import { ItemType } from 'antd/lib/menu/hooks/useItems';
import { partition } from 'lodash-es';
import cx from 'classnames';
Expand Down Expand Up @@ -283,19 +283,12 @@ interface ImageFilesProps {

function ImageFiles({ files }: ImageFilesProps) {
return (
<div className="flex flex-wrap gap-2">
<Image.PreviewGroup>
{files.map(({ id, name, url }) => (
<Image
key={id}
className="object-contain"
src={url}
title={name}
width={80}
height={80}
/>
))}
</Image.PreviewGroup>
<div>
{files.map(({ id, name, url }) => (
<a key={id} href={url} target="_blank">
<img src={url} alt={name} />
</a>
))}
</div>
);
}
Expand Down

0 comments on commit ebc382d

Please sign in to comment.