JavaScript 56.7%
TypeScript 42.6%
1"use client";23import { Download, FileQuestion } from "lucide-react";4import type { PreviewPluginProps } from "./types";5import { formatFileSize } from "@/lib/utils";67export default function FallbackPreview({ file }: PreviewPluginProps) {8 return (9 <div className="flex flex-col items-center justify-center h-full text-gray-400 p-8">10 <FileQuestion className="w-16 h-16 mb-4 text-gray-600" />11 <p className="text-lg mb-1">Aperçu non disponible</p>12 <p className="text-sm text-gray-500 mb-1">{file.name}</p>13 <p className="text-xs text-gray-600 mb-6">{file.mimeType} - {formatFileSize(file.size)}</p>14 <button15 onClick={() => window.open(`/api/files/${file.id}/download`, "_blank")}16 className="flex items-center gap-2 px-4 py-2 bg-white/10 rounded-lg text-sm text-white hover:bg-white/20 transition-colors"17 >18 <Download className="w-4 h-4" />19 Télécharger20 </button>21 </div>22 );23}24