Files
frontend/src/features/tbank-connection/ui/TbankConnectionSection/TbankConnectionSection.view.tsx
T
ksv741 b987fd8e78
Frontend security / security (push) Successful in 9s
Frontend verify / verify (push) Successful in 5m10s
Conventional commits / commits (pull_request) Successful in 25s
Frontend security / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 5m10s
refactor: colocate frontend component files
2026-09-23 08:34:58 +03:00

35 lines
864 B
TypeScript

import { Alert, Button, Skeleton } from "@mantine/core";
import { LoadingSkeleton } from "@wealthledger/ui";
import type { FC } from "react";
import { useTranslation } from "react-i18next";
type TbankConnectionErrorProps = {
retry: () => void;
};
const TbankConnectionLoading: FC = () => {
const { t } = useTranslation();
return (
<LoadingSkeleton label={t("states.loadingTitle")}>
<Skeleton height={20} width="45%" />
<Skeleton height={36} width={140} radius="sm" />
</LoadingSkeleton>
);
};
const TbankConnectionError: FC<TbankConnectionErrorProps> = (props) => {
const { retry } = props;
const { t } = useTranslation();
return (
<Alert color="red" title={t("tbank.statusError")}>
<Button variant="subtle" onClick={retry}>
{t("tbank.retry")}
</Button>
</Alert>
);
};
export { TbankConnectionError, TbankConnectionLoading };