MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / FilesSummary

Function FilesSummary

apps/web/ui/MessageForm/FilesSummary/index.tsx:13–39  ·  view source on GitHub ↗
({ uploading, progress, uploads }: Props)

Source from the content-addressed store, hash-verified

11}
12
13export 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}

Callers

nothing calls this directly

Calls 3

copyToClipboardFunction · 0.90
mapMethod · 0.80
successMethod · 0.80

Tested by

no test coverage detected