2023-11-03 15:02:48 +01:00
|
|
|
import { Entity } from 'megalodon'
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
media: Array<Entity.Attachment>
|
|
|
|
}
|
|
|
|
export default function Media(props: Props) {
|
|
|
|
return (
|
|
|
|
<div className="mt-2 flex flex-wrap">
|
|
|
|
{props.media.map((media, key) => (
|
|
|
|
<img
|
2023-11-04 10:14:00 +01:00
|
|
|
key={key}
|
2023-11-03 15:02:48 +01:00
|
|
|
src={media.preview_url}
|
|
|
|
className="h-36 mr-2 mb-2 rounded-md max-w-full cursor-pointer"
|
|
|
|
alt={media.description}
|
|
|
|
title={media.description}
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|