|
1 | 1 | import { useState, useEffect } from "react"; |
2 | 2 | import { motion, AnimatePresence } from "framer-motion"; |
3 | 3 | import { User, Clock, HardDrive, Image as ImageIcon } from "lucide-react"; |
4 | | -import { useTranslation } from "react-i18next"; |
5 | 4 | import { slideUpVariants, defaultTransition } from "@/lib/animations"; |
6 | 5 | import { cn } from "@/lib/utils"; |
7 | 6 | import { useThumbnailCache } from "@/hooks/useThumbnailCache"; |
@@ -32,8 +31,8 @@ function formatDuration(seconds: number | null): string { |
32 | 31 | /** |
33 | 32 | * Formats file size in bytes to a human-readable string |
34 | 33 | */ |
35 | | -function formatFileSize(bytes: number | null, t: (key: string, fallback?: string) => string): string { |
36 | | - if (bytes === null || bytes <= 0) return t("mediaInfo.unknownSize", "Unknown size"); |
| 34 | +function formatFileSize(bytes: number | null): string { |
| 35 | + if (bytes === null || bytes <= 0) return "Unknown size"; |
37 | 36 |
|
38 | 37 | const units = ["B", "KB", "MB", "GB"]; |
39 | 38 | let size = bytes; |
@@ -105,7 +104,6 @@ function LoadingSkeleton() { |
105 | 104 | } |
106 | 105 |
|
107 | 106 | function MediaInfoContent({ mediaInfo }: { mediaInfo: MediaInfo }) { |
108 | | - const { t } = useTranslation(); |
109 | 107 | const [showLargeThumbnail, setShowLargeThumbnail] = useState(false); |
110 | 108 | const [cachedThumbnail, setCachedThumbnail] = useState<string | null>(null); |
111 | 109 | const [thumbnailError, setThumbnailError] = useState(false); |
@@ -189,7 +187,7 @@ function MediaInfoContent({ mediaInfo }: { mediaInfo: MediaInfo }) { |
189 | 187 | {mediaInfo.filesizeApprox !== null && ( |
190 | 188 | <div className="flex items-center gap-1.5"> |
191 | 189 | <HardDrive className="h-3.5 w-3.5" /> |
192 | | - <span>{formatFileSize(mediaInfo.filesizeApprox, t)}</span> |
| 190 | + <span>{formatFileSize(mediaInfo.filesizeApprox)}</span> |
193 | 191 | </div> |
194 | 192 | )} |
195 | 193 | </div> |
|
0 commit comments