From 7c6eebb15165c1edb9d623da6b273bf77b0ecfed Mon Sep 17 00:00:00 2001 From: kenilkb Date: Thu, 16 Jul 2026 10:09:29 +0530 Subject: [PATCH] Fix: Exclude CSV files from text preview loader so they render as interactive spreadsheets --- .../src/features/assets/components/AssetViewerModal.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Channel-Frontend/src/features/assets/components/AssetViewerModal.tsx b/Channel-Frontend/src/features/assets/components/AssetViewerModal.tsx index f4f67d1..b05a022 100644 --- a/Channel-Frontend/src/features/assets/components/AssetViewerModal.tsx +++ b/Channel-Frontend/src/features/assets/components/AssetViewerModal.tsx @@ -92,6 +92,9 @@ export const AssetViewerModal: React.FC = ({ const isTextOrCodeAsset = (url: string, type: string) => { const assetUrl = url.toLowerCase(); + if (assetUrl.endsWith('.csv') || type.includes('csv')) { + return false; + } return ( assetUrl.endsWith('.md') || assetUrl.endsWith('.txt') ||