({ uploading, progress, uploads }: Props)
| 11 | } |
| 12 | |
| 13 | export default function FilesSummary({ uploading, progress, uploads }: Props) { |
| 14 | if (!uploading && uploads.length === 0) { |
| 15 | return null; |
| 16 | } |
| 17 | return ( |
| 18 | <ul className={styles.list}> |
| 19 | {uploading && ( |
| 20 | <li className={styles.text}>{`Uploading... ${progress}%`}</li> |
| 21 | )} |
| 22 | {uploads.map((file, index) => { |
| 23 | return ( |
| 24 | <li key={file.id}> |
| 25 | <div |
| 26 | className={styles.file} |
| 27 | onClick={() => { |
| 28 | copyToClipboard(file.url); |
| 29 | Toast.success('Copied to clipboard'); |
| 30 | }} |
| 31 | > |
| 32 | File {index + 1} |
| 33 | </div> |
| 34 | </li> |
| 35 | ); |
| 36 | })} |
| 37 | </ul> |
| 38 | ); |
| 39 | } |
nothing calls this directly
no test coverage detected