mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 19:57:52 +01:00
20 lines
452 B
TypeScript
20 lines
452 B
TypeScript
import React from 'react';
|
|
|
|
interface Props {
|
|
attachmentUrls?: string[];
|
|
}
|
|
|
|
const PostAttachments = ({ attachmentUrls = [] }: Props) => (
|
|
attachmentUrls.length > 0 &&
|
|
<div className="postAttachments">
|
|
{
|
|
attachmentUrls.map((url, index) => (
|
|
<a key={index} href={url} target="_blank">
|
|
<img src={url} className="postAttachment" />
|
|
</a>
|
|
))
|
|
}
|
|
</div>
|
|
);
|
|
|
|
export default PostAttachments; |