MCPcopy Create free account
hub / github.com/dailydotdev/apps / removeFile

Function removeFile

packages/shared/src/components/fields/DragDrop.tsx:203–209  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

201 } = useDragAndDrop({ disabled, onFiles: handleFiles });
202
203 const removeFile = (name: string) => {
204 const newFilenames = filenames.filter((n) => n !== name);
205 setFilenames(newFilenames);
206 if (newFilenames.length === 0) {
207 onFilesDrop([], []);
208 }
209 };
210
211 if (!isLaptop) {
212 const isProcessed = !isError && filenames?.length;

Callers 1

DragDropComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected