diff --git a/frontend/src/components/FileExplorer.tsx b/frontend/src/components/FileExplorer.tsx
index 3dc1678..d8720bb 100644
--- a/frontend/src/components/FileExplorer.tsx
+++ b/frontend/src/components/FileExplorer.tsx
@@ -1163,15 +1163,15 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
const isAudio = ['mp3', 'flac', 'wav', 'm4a', 'wma', 'aac'].includes(ext) || file.mime_type?.startsWith('audio/');
const isMedia = isImage || isVideo || isOffice || isAudio || ext === 'pdf';
- if (ext === 'pdf') {
- return (
-
- PDF
-
- );
- }
-
const fallbackIcon = (() => {
+ if (ext === 'pdf') {
+ return (
+
+ PDF
+
+ );
+ }
+
if (ext === 'docx' || ext === 'doc') {
return (
@@ -1241,16 +1241,10 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
if (isMedia && file.checksum && viewMode === 'grid') {
const docType = file.name.endsWith('.docx') ? 'docs' : file.name.endsWith('.pptx') ? 'slides' : (file.name.endsWith('.xlsx') || file.name.endsWith('.xls')) ? 'sheets' : ext === 'pdf' ? 'pdf' : null;
- // Use fallbackIcon for PDF too so it shows "PDF" text while loading
- const currentFallback = ext === 'pdf' ? (
-
- PDF
-
- ) : fallbackIcon;
return (
-
+
);
}