Files
frontend/src/pages/account-operations/ui/AccountOperationsPage/components/AccountOperationsPageError.view.tsx
T
ksv741 5b30bb802a feat: add quiet reading with rare confirmations
Part of the quiet-user-feedback change; docs and specs land in their own repositories.
2026-10-06 07:01:58 +03:00

33 lines
735 B
TypeScript

import type { FC } from "react";
import { Button } from "@mantine/core";
import { StateView } from "@wealthledger/ui";
import { useTranslation } from "react-i18next";
import type { AccountOperationsPageViewModel } from "../AccountOperationsPage.vm";
type AccountOperationsPageErrorProps = Extract<
AccountOperationsPageViewModel,
{ state: "error" }
>;
const AccountOperationsPageError: FC<AccountOperationsPageErrorProps> = (
props,
) => {
const { t } = useTranslation();
return (
<StateView
action={(
<Button onClick={props.onReset} variant="default">
{t("ledger.reset")}
</Button>
)}
text={t("ledger.errorText")}
title={t("ledger.errorTitle")}
/>
);
};
export { AccountOperationsPageError };