import { useTranslation } from "react-i18next"; import { I18nKey } from "#/i18n/declaration"; import { formatTimeDelta } from "#/utils/format-time-delta"; interface GitSyncErrorBannerProps { error: string; errorAt: string | null; } export function GitSyncErrorBanner({ error, errorAt, }: GitSyncErrorBannerProps) { const { t } = useTranslation("openhands"); return (

{t(I18nKey.AUTOMATIONS$GIT_SYNC$LAST_ERROR_TITLE)}

{error}

{errorAt && (

{`${formatTimeDelta(errorAt)} ${t(I18nKey.CONVERSATION$AGO)}`}

)}
); }