Merge pull request #33560 from overleaf/mj-conversion-cleanup

[clsi+web] Small cleanups and improvements to conversions / exports

GitOrigin-RevId: 300adfbb91e89f754ee7f835db792ccb50b27613
This commit is contained in:
Mathias Jakobsen
2026-05-12 08:06:17 +00:00
committed by Copybot
parent 62d92b70dd
commit 6b28a4ee5a
9 changed files with 381 additions and 433 deletions
@@ -6,6 +6,7 @@ import { useCallback } from 'react'
import {
hidePreparingExportToast,
showExportDocumentError,
showExportDocumentSuccess,
showPreparingExportToast,
} from '../components/toolbar/export-document-toasts'
@@ -32,6 +33,9 @@ export default function useConvertProject(type: 'docx' | 'markdown') {
if (downloadUrl) {
const url = new URL(downloadUrl, window.location.origin)
location.assign(url.toString())
showExportDocumentSuccess(type)
} else {
showExportDocumentError()
}
} catch (error) {
hidePreparingToast()