import { useAutoUpdater } from '../hooks/useAutoUpdater'; import { Button } from './ui/button'; import { Card } from './ui/card'; import { Progress } from './ui/progress'; export function UpdateNotification() { const { status, checkForUpdates, downloadAndInstall } = useAutoUpdater(true); if (status.error) { return null; } if (!status.available && !status.checking) { return null; } if (status.checking) { return (
Checking for updates...
); } if (status.available) { return (

Update Available

Version {status.version} is ready to install

{status.downloading && (

Downloading update...

)} {status.installing && (

Installing update...

App will restart automatically

)} {!status.downloading && !status.installing && (
)}
); } return null; }