From 2af1ff32e9c0f73b89730617bb17eed0b4852676 Mon Sep 17 00:00:00 2001 From: Elijah Date: Mon, 22 Jun 2026 12:24:34 -0700 Subject: [PATCH] Fix zip archive preview internal state stickyness --- frontend/src/components/FilePreview.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/components/FilePreview.tsx b/frontend/src/components/FilePreview.tsx index c220cca..7dff85d 100644 --- a/frontend/src/components/FilePreview.tsx +++ b/frontend/src/components/FilePreview.tsx @@ -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);