import { Button, Stack } from "@mantine/core"; import { StateView } from "@wealthledger/ui"; import type { FC } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router"; type AccountsPageErrorProps = { code?: string; retry?: () => void }; const AccountsPageError: FC = (props) => { const { code, retry } = props; const { t } = useTranslation(); const settingsAction = ( ); if (code === "TBANK_NOT_CONNECTED") return ( ); if (code === "INVALID_TBANK_TOKEN") return ( ); if (code === "TBANK_UNAVAILABLE") return ( {settingsAction} } /> ); return ( {t("accounts.retry")}} /> ); }; export { AccountsPageError };