( contents: DownloadContent[], format: ExportFormat )
| 159 | }; |
| 160 | |
| 161 | const downloadAll = async ( |
| 162 | contents: DownloadContent[], |
| 163 | format: ExportFormat |
| 164 | ) => { |
| 165 | if (contents.length === 0) return; |
| 166 | if (contents.length === 1) { |
| 167 | downloadSingle(contents[0], format); |
| 168 | return; |
| 169 | } |
| 170 | await downloadZip(contents, format); |
| 171 | }; |
| 172 | |
| 173 | /** |
| 174 | * React port of `frontend/src/components/DataExportButton.vue`. |
no test coverage detected