"use client"; import ReactMarkdown from "react-markdown"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, } from "@/components/ui/dialog"; import { useUpdate } from "@/hooks/useUpdate"; export function UpdateDialog() { const { updateInfo, showDialog, setShowDialog, dismissUpdate } = useUpdate(); if (!updateInfo?.updateAvailable) return null; return ( { if (!open) dismissUpdate(); }}> New Version Available {updateInfo.releaseName} {updateInfo.publishedAt && ( {new Date(updateInfo.publishedAt).toLocaleDateString()} )} {updateInfo.releaseNotes && (

{children}

, h2: ({ children }) =>

{children}

, h3: ({ children }) =>

{children}

, p: ({ children }) =>

{children}

, ul: ({ children }) =>
    {children}
, ol: ({ children }) =>
    {children}
, li: ({ children }) =>
  • {children}
  • , a: ({ href, children }) => ( {children} ), code: ({ children }) => ( {children} ), }} > {updateInfo.releaseNotes}
    )}

    Current: v{updateInfo.currentVersion} → Latest: v{updateInfo.latestVersion}

    ); }