import { OrderedMap } from "immutable"; import { v4 } from "uuid"; import { Guid, SimpleCallback } from "../../../../../main"; export const AttachmentsList = (props: { attachments: OrderedMap; add: SimpleCallback<[Guid, File]>; remove: SimpleCallback; }) => ( <> { if (e.currentTarget.files != null) props.add([v4(), e.currentTarget.files[0]]); }} /> );