import toast from 'react-hot-toast' import { ActionButton } from './ActionButton' import { openExternalBrowserIfDesktop } from 'lib/openWindow' import { Marked } from '@ts-stack/markdown' import { getReleaseUrl } from 'routes/Settings' export function ToastUpdate({ version, releaseNotes, onRestart, onDismiss, }: { version: string releaseNotes?: string onRestart: () => void onDismiss: () => void }) { const containsBreakingChanges = releaseNotes ?.toLocaleLowerCase() .includes('breaking') return (
v{version}

A new update has downloaded and will be available next time you start the app. You can view the release notes{' '} here on GitHub.

{releaseNotes && (
Release notes {containsBreakingChanges && ( (Breaking changes) )}
)}
Restart app now { toast.dismiss() onDismiss() }} > Got it
) }