import type { MarkedOptions } from '@ts-stack/markdown' import { Marked, escape, unescape } from '@ts-stack/markdown' import toast from 'react-hot-toast' import { ActionButton } from '@src/components/ActionButton' import { SafeRenderer } from '@src/lib/markdown' import { openExternalBrowserIfDesktop } from '@src/lib/openWindow' import { getReleaseUrl } from '@src/routes/utils' export function ToastUpdate({ version, releaseNotes, onRestart, onDismiss, }: { version: string releaseNotes?: string onRestart: () => void onDismiss: () => void }) { const containsBreakingChanges = releaseNotes ?.toLocaleLowerCase() .includes('breaking') const markedOptions: MarkedOptions = { gfm: true, breaks: true, sanitize: true, unescape, escape, } return (
A new update has downloaded and will be available next time you start the app. You can view the release notes{' '} here on GitHub.