import { GlobalToastGeneratorEntry } from '@/features/ide-react/components/global-toasts' import { useTranslation } from 'react-i18next' import OLButton from '@/features/ui/components/ol/ol-button' export const SynctexFileErrorToast = () => { const { t } = useTranslation() return (
{t('synctex_failed')} {t('more_info')}
) } const generators: GlobalToastGeneratorEntry[] = [ { key: 'synctex:file-error', generator: () => ({ content: , type: 'warning', autoHide: true, delay: 4000, isDismissible: true, }), }, ] export default generators export const showFileErrorToast = () => { window.dispatchEvent( new CustomEvent('ide:show-toast', { detail: { key: 'synctex:file-error', }, }) ) }