feat: support markdown file previews in FilePreview component

This commit is contained in:
ZareMate 2025-05-04 19:11:20 +02:00
parent f2d2268039
commit 8798764b89
Signed by: zaremate
GPG Key ID: 369A0E45E03A81C3

View File

@ -89,7 +89,7 @@ export function FilePreview({ fileId, fileType }: FilePreviewProps) {
<img src="/icons/files/archive.svg" alt="Archive file preview" className="max-w-full max-h-96 rounded-lg invert" />
);
}
if (getFileType(fileType).startsWith("code")) {
if (getFileType(fileType).startsWith("code") || getFileType(fileType).startsWith("markdown")) {
return (
<img src="/icons/files/code.svg" alt="Code file preview" className="max-w-full max-h-96 rounded-lg invert" />
);