(bytes: number)
| 30 | } |
| 31 | |
| 32 | function formatFileSize(bytes: number): string { |
| 33 | const mb = bytes / 1024 / 1024 |
| 34 | if (mb < 0.01) return `${(bytes / 1024).toFixed(0)}KB` |
| 35 | return `${mb.toFixed(2)}MB` |
| 36 | } |
| 37 | |
| 38 | function showErrorToast(message: React.ReactNode) { |
| 39 | toast.custom( |