Fix zip archive preview internal state stickyness
All checks were successful
Automated Container Build / build-and-push (push) Successful in 28s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 28s
This commit is contained in:
parent
099e066223
commit
2af1ff32e9
1 changed files with 6 additions and 0 deletions
|
|
@ -79,6 +79,12 @@ export default function FilePreview({ file, onClose, downloadToken, theme = 'dar
|
|||
}, [file, onClose]);
|
||||
|
||||
useEffect(() => {
|
||||
setContent(null);
|
||||
setArchiveItems(null);
|
||||
setArchivePath('');
|
||||
setLoading(false);
|
||||
setError(null);
|
||||
|
||||
if (!file) return;
|
||||
|
||||
const type = getPreviewType(file);
|
||||
|
|
|
|||
Reference in a new issue