componentes-sinco 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -415,21 +415,10 @@ var Attachment = ({
415
415
  const [isDragFile, setIsDragFile] = useState4(false);
416
416
  const inputRef = useRef(null);
417
417
  useEffect4(() => {
418
- const interval = setInterval(() => {
419
- setFiles((prevFiles) => {
420
- let updated = false;
421
- const nuevosArchivos = prevFiles.map((file) => {
422
- if (!file.uploadError && file.progress < 100) {
423
- updated = true;
424
- return __spreadProps(__spreadValues({}, file), { progress: Math.min(file.progress + 15, 100) });
425
- }
426
- return file;
427
- });
428
- return updated ? nuevosArchivos : prevFiles;
429
- });
430
- }, 1e3);
431
- return () => clearInterval(interval);
432
- }, [files]);
418
+ if (initialFiles.length > 0) {
419
+ setFiles(initialFiles);
420
+ }
421
+ }, [initialFiles]);
433
422
  const handleDrop = (event2) => {
434
423
  event2.preventDefault();
435
424
  setIsDragFile(false);