(format: ExportFormat)
| 109 | }; |
| 110 | |
| 111 | const getExportFileType = (format: ExportFormat) => { |
| 112 | switch (format) { |
| 113 | case ExportFormat.CSV: |
| 114 | return "text/csv"; |
| 115 | case ExportFormat.JSON: |
| 116 | return "application/json"; |
| 117 | case ExportFormat.SQL: |
| 118 | return "application/sql"; |
| 119 | case ExportFormat.XLSX: |
| 120 | return "application/vnd.ms-excel"; |
| 121 | default: |
| 122 | return "application/octet-stream"; |
| 123 | } |
| 124 | }; |
| 125 | |
| 126 | const toBlob = ( |
| 127 | { content, filename }: DownloadContent, |