File size: 846 Bytes
3201ca6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import { useTranslation } from "react-i18next";
import { I18nKey } from "#/i18n/declaration";
import ExclamationCircleIcon from "#/icons/exclamation-circle.svg?react";
interface ErrorStateProps {
onRetry: () => void;
}
export function ErrorState({ onRetry }: ErrorStateProps) {
const { t } = useTranslation("openhands");
return (
<div className="flex flex-col items-center justify-center py-20">
<ExclamationCircleIcon className="size-12 text-danger" />
<p className="mt-4 text-sm text-muted">
{t(I18nKey.AUTOMATIONS$ERROR_TITLE)}
</p>
<button
type="button"
onClick={onRetry}
className="mt-4 rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised"
>
{t(I18nKey.AUTOMATIONS$ERROR_RETRY)}
</button>
</div>
);
}
|