import { useUpdate } from "@/contexts/UpdateContext"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; interface UpdateBadgeProps { className?: string; onClick?: () => void; } export function UpdateBadge({ className = "", onClick }: UpdateBadgeProps) { const { hasUpdate, updateInfo } = useUpdate(); const { t } = useTranslation(); const isActive = hasUpdate && updateInfo; const title = isActive ? t("settings.updateAvailable", { version: updateInfo?.availableVersion ?? "", }) : t("settings.checkForUpdates"); if (!isActive) { return null; } return ( ); }